|
This example waits up to two minutes for a particular push button to appear.
Sub Main
Dim Result As Integer
Window SetContext, "Caption=MyApp", ""
MenuSelect "File->Open..."
Window SetContext, "Caption=Open", ""
'The OK button may take a long time to appear. We can use
' SQAWaitForObject to synchronize our script without
' increasing the default wait period of all other actions
Result = SQAWaitForObject("Type=PushButton;Text=OK", 120000)
If Result = sqaSuccess Then
... ' add the rest of the actions/tests here
End If
End Sub
这些函数的例子,help里面都有,希望能动手自己找找! |
|