|
我在进行参数化设置后运行报错,请大家们帮帮忙,谢谢!
录制的代码如下:
Browser("Welcome: Mercury Tours").Page("Welcome: Mercury Tours").WebEdit("userName").Set "blue"
Browser("Welcome: Mercury Tours").Page("Welcome: Mercury Tours").WebEdit("password").SetSecure "47a013f98b29c35d22436f59665c363abff630dc4962"
Browser("Welcome: Mercury Tours").Page("Welcome: Mercury Tours").Image("Sign-In").Click 35,11
wait(5)
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 "29"
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 "31"
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 51,13
Browser("Welcome: Mercury Tours").Page("Select a Flight: Mercury").Image("reserveFlights").Click 53,11
Browser("Welcome: Mercury Tours").Page("Book a Flight: Mercury_2").Check CheckPoint("Book a Flight: Mercury")
Browser("Welcome: Mercury Tours").Page("Book a Flight: Mercury_2").WebTable("New York to San Francisco").Check CheckPoint("New York to San Francisco")
Browser("Welcome: Mercury Tours").Page("Book a Flight: Mercury").WebEdit("passFirst0").Set "fistname"
Browser("Welcome: Mercury Tours").Page("Book a Flight: Mercury").WebEdit("passFirst0").Check CheckPoint("passFirst0")
Browser("Welcome: Mercury Tours").Page("Book a Flight: Mercury").WebEdit("passLast0").Set "lastname"
Browser("Welcome: Mercury Tours").Page("Book a Flight: Mercury").WebEdit("creditnumber").Set "8888888888888888"
Browser("Welcome: Mercury Tours").Page("Book a Flight: Mercury").WebCheckBox("ticketLess").Set "ON"
Browser("Welcome: Mercury Tours").Page("Book a Flight: Mercury").Image("buyFlights").Click 65,11
Browser("Welcome: Mercury Tours").Page("Flight Confirmation: Mercury_2").Check CheckPoint("Flight Confirmation: Mercury")
Browser("Welcome: Mercury Tours").Page("Flight Confirmation: Mercury").Image("home").Click
运行时报错如下:
Cannot identify the specified item of the fromPort object. Confirm that the specified item is included in the object's item collection.
Line (5): "Browser("Welcome: Mercury Tours").Page("Find a Flight: Mercury").WebList("fromPort").Select DataTable("departure", dtGlobalSheet)". |
|