wait从字面意思为等候的意思,中QTP中同样为等候,就正在正在运用那个wait以后,当脚原执止到那一步的时候将显现光阳等候,相比同步点没这么活络。
以下是wait的格局:WaitSeconds[,Milliseconds]
譬喻:
blnDone=Window("Flight ReserZZZation").Dialog("Flights Table").EVist
counter=1
While Not blnDone
Wait (2)
blnDone=Window("Flight ReserZZZation").Dialog("Flights Table").EVist
counter=counter+1
If counter=10 then
blnDone=True
End if
Wend
以下为真例:那是源文件
'Browser("VVVVVVVVVVV 版原号:x4.1.0.2").Page("VVVVVVVVVVV ").Frame("main_center_4").Image("flowButtonLine2").FireEZZZent "onmouseoZZZer"
参预wait后
Dim blnDone
blnDone=Browser("VVVVVVVVVVV 版原号:x4.1.0.2").Page("VVVVVVVVVVV").Frame("main_center_4").Image("flowButtonLine2")
count=1
While Not blnDone
Wait (10)
blnDone= Browser("VVVVVVVVVVV 版原号:x4.1.0.2").Page("VVVVVVVVVVV").Frame("main_center_4").Image("flowButtonLine2")
count=count+1
if count=10 then
blnDone=True
end if
wend
丰裕操做微博加速社区展开