steam钓鱼游戏:[原创]QTP使用循环语句等待对象出现的方法
来源:百度文库 编辑:偶看新闻 时间:2024/06/11 06:45:27
原创]QTP使用循环语句等待对象出现的方法 (2009-04-10 23:29:05)转载 标签:
Dialog("Login").WinEdit("Password:").SetSecure "49df4eabed69867d55a22bbcdc7cceb6d10c9abc"
Dialog("Login").WinButton("OK").Click
Window("Flight Reservation").WinObject("Date of Flight:").Type "090410"
Window("Flight Reservation").WinComboBox("Fly From:").Select "Frankfurt"
Window("Flight Reservation").WinComboBox("Fly To:").Select "London"
Window("Flight Reservation").WinButton("FLIGHT").Click
Window("Flight Reservation").Dialog("Flights Table").WinList("From").Select "13564 FRA 03:12 PM LON 03:57 PM SR $162.10"
Window("Flight Reservation").Dialog("Flights Table").WinButton("OK").Click
Window("Flight Reservation").WinEdit("Name:").Set "Cheers.Lee"
Window("Flight Reservation").WinButton("Insert Order").Click
a=Window("Flight Reservation").WinEdit("Order No:").GetROProperty("text")
do while a=""
wait 1
a=Window("Flight Reservation").WinEdit("Order No:").GetROProperty("text")
Loop
'msgbox a
Window("Flight Reservation"). Close Wait(1)Loop判断WebEdite这个对象是否出现,如果没有出现,执行Wait(1),如果出现,跳出循环。5. 死等大法。就是用Wait()语句设置等待时间,死等,比如Wait(10),就是脚本停止10秒,任何操作都不做,10秒之后继续往下执行操作。
qtp
自动化
测试
循环语句
等待对象
出现
方法
it
分类: QTP测试工具
Dialog("Login").WinEdit("Password:").SetSecure "49df4eabed69867d55a22bbc
Dialog("Login").WinButton("OK").Click
Window("Flight Reservation").WinObject("Date of Flight:").Type "090410"
Window("Flight Reservation").WinComboBox("Fly From:").Select "Frankfurt"
Window("Flight Reservation").WinComboBox("Fly To:").Select "London"
Window("Flight Reservation").WinButton("FLIGHT").Click
Window("Flight Reservation").Dialog("Flights Table").WinList("From").Select "13564
Window("Flight Reservation").Dialog("Flights Table").WinButton("OK").Click
Window("Flight Reservation").WinEdit("Name:").Set "Cheers.Lee"
Window("Flight Reservation").WinButton("Insert Order").Click
a=Window("Flight Reservation").WinEdit("Order No:").GetROProperty("text")
do
wait 1
a=Window("Flight Reservation").WinEdit("Order No:").GetROProperty("text")
Loop
'msgbox a
Window("Flight Reservation").
matlab 如何使用循环语句
ASP的循环语句
javascript的循环语句问题,如何循环?
for循环语句的问题
for循环语句的问题
for循环语句的问题
C语言的循环语句
有关for循环语句的问题!
C++中的for循环语句的问题:
lingo如何实现语句的循环?
强行停止循环的语句是什么?
关于VB6使用ADO对象连接MySQL数据库的具体语句
等待他的出现,等待
用穷举法找出1~100的质数并显示出来。分别使用while,do-while,for循环语句实现。
goto语句的使用
宵衣旰食的使用对象。
C语言循环语句
C++循环语句
循环语句VB问题
pb循环语句
pb循环语句
VB 推出循环语句
SQL中循环语句
有没有人使用过QTP 指教指教