|
小弟刚学用QTP,在参数化的过程中遇到的问题,希望各位大哥能帮帮我!!!
我在录制QTP自带的飞机订票系统的过程中,我在出发地点(在Departing form下拉列表框中)设置参数,
代码为:Browser("Welcome: Mercury Tours").Page("Find a Flight: Mercury").WebList("fromPort").Select DataTable("departure", dtGlobalSheet) ,参数分别为New York,Portland,Seattle,
而在Flight Confirmation:Mercury这一步中设置文字检查点,
代码为:Browser("Welcome: Mercury Tours").Page("Flight Confirmation: Mercury").Check CheckPoint("New York"),也设置了检查点的属性了!!!
问题是这样的:当我在回放脚本的时候,第一个参数New York执行一次脚本完成,执行第二个参数Portland的时候就出现这个的错误了,
如图附件:
请各位高手指点指点啊!谢谢了!!!
全部脚本如下:
Browser("Welcome: Mercury Tours").Page("Welcome: Mercury Tours").WebEdit("userName").Set "seasons_28"
Browser("Welcome: Mercury Tours").Page("Welcome: Mercury Tours").WebEdit("password").SetSecure "45c41b99caedb4c9c017b8d8a2638ba544f267f5"
Browser("Welcome: Mercury Tours").Page("Welcome: Mercury Tours").Image("Sign-In").Click 29,9
Browser("Welcome: Mercury Tours").Page("Find a Flight: Mercury").Sync
Browser("Welcome: Mercury Tours").Page("Find a Flight: Mercury").WebList("fromPort").Select DataTable("departure", dtGlobalSheet)
Browser("Welcome: Mercury Tours").Page("Find a Flight: Mercury").WebList("fromMonth").Select "December"
Browser("Welcome: Mercury Tours").Page("Find a Flight: Mercury").WebList("fromDay").Select "9"
Browser("Welcome: Mercury Tours").Page("Find a Flight: Mercury").WebList("toPort").Select "San Francisco"
Browser("Welcome: Mercury Tours").Page("Find a Flight: Mercury").WebList("toMonth").Select "December"
Browser("Welcome: Mercury Tours").Page("Find a Flight: Mercury").WebList("toDay").Select "11"
Browser("Welcome: Mercury Tours").Page("Find a Flight: Mercury").WebRadioGroup("servClass").Select "Business"
Browser("Welcome: Mercury Tours").Page("Find a Flight: Mercury").Image("findFlights").Click 59,9
Browser("Welcome: Mercury Tours").Page("Select a Flight: Mercury").WebRadioGroup("outFlight").Select "Blue Skies Airlines$361$271$7:10"
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 43,9
Browser("Welcome: Mercury Tours").Page("Book a Flight: Mercury").Check CheckPoint("Book a Flight: Mercury")
Browser("Welcome: Mercury Tours").Page("Book a Flight: Mercury").WebTable("New York to San Francisco").Check CheckPoint("New York to San Francisco_2")
Browser("Welcome: Mercury Tours").Page("Book a Flight: Mercury").WebEdit("passFirst0").Set "David"
Browser("Welcome: Mercury Tours").Page("Book a Flight: Mercury").WebEdit("passFirst0").Check CheckPoint("passFirst0_2")
Browser("Welcome: Mercury Tours").Page("Book a Flight: Mercury").WebEdit("passLast0").Set "Raymond"
Browser("Welcome: Mercury Tours").Page("Book a Flight: Mercury").WebEdit("creditnumber").Set "8888888888888888"
Browser("Welcome: Mercury Tours").Page("Book a Flight: Mercury").Image("buyFlights").Click 70,11
Browser("Welcome: Mercury Tours").Page("Flight Confirmation: Mercury").Check CheckPoint("New York")
Browser("Welcome: Mercury Tours").Page("Flight Confirmation: Mercury").Image("home").Click
Browser("Welcome: Mercury Tours").Page("Welcome: Mercury Tours_2").Sync |
|