Trouble grabbing a popup message content using DP


I'm trying to use DP to get the value of a simple popup message by creating a function that will live in a shared function library.  Here is the code:

If Dialog("text:="&NxPracticecaption).Exist(5) Then
    MsgBox ("dialog found")
'    If Static("nativeclass:=Static", "text:="&ExpectedMessage).Exists(0) Then
    If Static("nativeclass:=Static""text:="&ExpectedMessage).Exists(0) Then
        MsgBox ("Message found")
        VerifyPopups = 0
        Exit Function
        End If
    End If
MsgBox ("Message NOT found!!!")    
VerifyPopups = -1


2 things I'm struggling with:

  1. The Static("nativeclass...... code is incorrect, and throwing an error: File: C:\code\trunk\QA\UFT\Shared\FunctionLibraries\PracticeFunctionLibrary.qfl line (74): " If Static("nativeclass:=Static", "text:="&ExpectedMessage).Exists(0) Then". Description: Syntax error.  Having a heck of a time debugging.
  2. What are the items like Static, Dialog, Window, etc. that preceed the descriptions referred to as? I did some research, and it seems that they are defined in the registry with items that are used to for recognition properties, but that just a shot in the dark guess from a relatively novice qtp/uft user (me).  

I'm hoping this is a little bit more than just being fairly ignorant on object programming and uft in particular and the solution can help others with similar levels of experience.



Parents Reply Children