Author: David Eulerdate: 2004/10 / 20Email: DE_EULER-David@yahoo.com There is any problem, please contact me :) Use the Rational Robot Record automatic test GUI script, after clicking a button, the result may have A variety of, a dialog box containing the "Determined" button may also appear, or a form titled "Title ABCD" can appear, you can use the SqaWaitForPropertyValue method to determine the properties, or use the sqaWaitForObject to determine what form thereof. The following is an example in which two possible attributes can be judged. 1). If there is a determination dialog, click the OK button, or the "OK button does not appear": 'Wait 2 seconds until the determination button appears .Result = SQAITFORPROPERTYVALUE ("Text = (o) OK", "enabled" , True, 2000) If Result <> SQASUCCESS THENPRINT "OK" ELSE PUSHBUTTON CLICK, "Text = (O) Determines" END IF2). If the title "Title ABCD" appears, print " The title of Title Abcd appears "", otherwise print "Forms that do not appear as Title Abcd": 'Wait 2 seconds until the title of Title ABCD appears .Result = sqawayforpropertyValue ("CAPTION = Title ABCD", " Enabled ", True, 2000) if Result <> SQASUCCESS TENPUSHBUTTON CLICK," Text = (o) Determine "Print" The title "Else Print" "Else Print" appears in the title "END IF Description : 1) .result is an Integer type variable; 2) .sqaWaitForPropertyValue: As the name suggests, it is to wait for a property to be paused before being specified. SQAWAITFORPROPERTYVALUE ("Text = (o) OK," Enabled ", True, 2000) means waiting for 2 seconds until the determination button appears, if there is no appearance in 2 seconds, return SQLFALSE, return SQLSuccess; 3) .sqa Basic <> Indicates that it is not equal to; 4). In addition, it can be used to determine the object type that appears in SQAWAITForObject: Result = SQAITForObject ("Type = Pushbutton; Text = OK", 2000) if Result = SQASUCCESS THEN ... 'Add The REST Of the actions / tests here