|
大家我,最近我在录制一个事例程序,http://newtours.mercuryinteractive.com/tour/mercurywelcome.php,就是这个订票程序,按照例子走,回放都是正常的,控件可以识别hightlight,但是当我打开别的IE的程序的时候,这个程序的控件识别不了,用hightlight.但是依然可以跑的正常,我的疑问是QTP ,为什么回放正常,却无法识别这些控件.它怎么找到这些对象的 ,当它回放的时候.
代码如下:
Browser("Welcome: Mercury Tours").Page("Welcome: Mercury Tours").WebEdit("userName").Set "fur"
Browser("Welcome: Mercury Tours").Page("Welcome: Mercury Tours").WebEdit("password").SetSecure "46ce449e391f97dfda80bd37"
Browser("Welcome: Mercury Tours").Page("Welcome: Mercury Tours").Image("Sign-In").Click 26,8
Browser("Welcome: Mercury Tours").Page("Find a Flight: Mercury").WebList("passCount").Select "2"
Browser("Welcome: Mercury Tours").Page("Find a Flight: Mercury").WebList("fromPort").Select "New York"
Browser("Welcome: Mercury Tours").Page("Find a Flight: Mercury").WebList("toPort").Select "San Francisco"
Browser("Welcome: Mercury Tours").Page("Find a Flight: Mercury").WebList("airline").Select "Unified Airlines"
Browser("Welcome: Mercury Tours").Page("Find a Flight: Mercury").Image("findFlights").Click 74,11
'Browser("Welcome: Mercury Tours").Page("Select a Flight: Mercury").Check CheckPoint("[0-1][0-9]/[0-3][0-9]/200[0-9]")
Browser("Welcome: Mercury Tours").Page("Select a Flight: Mercury").WebRadioGroup("outFlight").Select "Unified Airlines$363$281$11:24"
Browser("Welcome: Mercury Tours").Page("Select a Flight: Mercury").WebRadioGroup("inFlight").Select "Pangea Airlines$632$282$16:37"
Browser("Welcome: Mercury Tours").Page("Select a Flight: Mercury").Image("reserveFlights").Click 64,3
Browser("Welcome: Mercury Tours").Page("Book a Flight: Mercury").WebEdit("passFirst0").Set "san"
Browser("Welcome: Mercury Tours").Page("Book a Flight: Mercury").WebEdit("passLast0").Set "zhang"
Browser("Welcome: Mercury Tours").Page("Book a Flight: Mercury").WebList("pass.0.meal").Select "Vegetarian"
Browser("Welcome: Mercury Tours").Page("Book a Flight: Mercury").WebEdit("passFirst1").Set "san"
Browser("Welcome: Mercury Tours").Page("Book a Flight: Mercury").WebEdit("passLast1").Set "zhang"
Browser("Welcome: Mercury Tours").Page("Book a Flight: Mercury").WebList("pass.1.meal").Select "Kosher"
Browser("Welcome: Mercury Tours").Page("Book a Flight: Mercury").WebEdit("creditnumber").Set "8888888888888888"
Browser("Welcome: Mercury Tours").Page("Book a Flight: Mercury").WebList("cc_exp_dt_mn").Select "03"
Browser("Welcome: Mercury Tours").Page("Book a Flight: Mercury").WebList("cc_exp_dt_yr").Select "2009"
Browser("Welcome: Mercury Tours").Page("Book a Flight: Mercury").WebEdit("cc_frst_name").Set "san"
Browser("Welcome: Mercury Tours").Page("Book a Flight: Mercury").WebEdit("cc_last_name").Set "zhang"
Browser("Welcome: Mercury Tours").Page("Book a Flight: Mercury").Image("buyFlights").Click 91,6
Browser("Welcome: Mercury Tours").Page("Flight Confirmation: Mercury").Image("home").Click
Browser("Welcome: Mercury Tours").Page("Welcome: Mercury Tours_2").Sync |
|