TA的每日心情 | 开心 2017-4-28 09:33 |
---|
签到天数: 392 天 连续签到: 5 天 [LV.9]测试副司令
|
在录制QTP订票拆分为多操作并且参数化Copy of FlightOrder 后不能回放,拆分多操作后可以回放,参数化后不可回放,错误如下:
Cannot find the "fromPort" object's parent "Welcome: Mercury Tours" (class Browser). Verify that parent properties match an object currently displayed in your application.
Line (1): "Browser("Welcome: Mercury Tours").Page("Find a Flight: Mercury").WebList("fromPort").Select "London"".
脚本代码如下:
Browser("Welcome: Mercury Tours").Page("Find a Flight: Mercury").WebList("fromPort").Select "London"
Browser("Welcome: Mercury Tours").Page("Find a Flight: Mercury").WebList("fromMonth").Select DataTable("FromM", dtLocalSheet)
Browser("Welcome: Mercury Tours").Page("Find a Flight: Mercury").WebList("fromDay").Select "29"
Browser("Welcome: Mercury Tours").Page("Find a Flight: Mercury").WebList("toPort").Select DataTable("ArrivalCity", dtLocalSheet)
Browser("Welcome: Mercury Tours").Page("Find a Flight: Mercury").WebList("toMonth").Select DataTable("ToM", dtLocalSheet)
Browser("Welcome: Mercury Tours").Page("Find a Flight: Mercury").WebList("toDay").Select "31"
Browser("Welcome: Mercury Tours").Page("Find a Flight: Mercury").Image("findFlights").Click 52,15
Browser("Welcome: Mercury Tours").Page("Select a Flight: Mercury").Image("reserveFlights").Click 53,9
Browser("Welcome: Mercury Tours").Page("Book a Flight: Mercury").WebEdit("passFirst0").Set "tian"
Browser("Welcome: Mercury Tours").Page("Book a Flight: Mercury").WebEdit("passLast0").Set "xiayu"
Browser("Welcome: Mercury Tours").Page("Book a Flight: Mercury").WebEdit("creditnumber").Set "456123"
Browser("Welcome: Mercury Tours").Page("Book a Flight: Mercury").Image("buyFlights").Click 79,14
Browser("Welcome: Mercury Tours").Page("Flight Confirmation: Mercury").Image("backtoflights").Click
Browser("Welcome: Mercury Tours").Page("Find a Flight: Mercury").Sync |
|