Micro Focus QTP (UFT) Forums
Running Mercury Tours test fails - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: Running Mercury Tours test fails (/Thread-Running-Mercury-Tours-test-fails)



Running Mercury Tours test fails - dabowers - 01-10-2010

Hi,

I can record a test to book a flight in Mercury Tours. However when i run the test, the passenger information is lost on "mercurypurchase.php" page. So the passenger firstname and last name cannot be filled out and so test run fails. I attach a screen shot.

Hope you can help.

D


RE: Running Mercury Tours test fails - dabowers - 01-21-2010

Code:
Browser("Browser").Navigate "http://[Site Name]/"
Browser("Welcome: Mercury Tours").Page("Welcome: Mercury Tours").Check CheckPoint("Welcome: Mercury Tours")
Browser("Welcome: Mercury Tours").Page("Welcome: Mercury Tours").WebEdit("userName").Set "mercury"
Browser("Welcome: Mercury Tours").Page("Welcome: Mercury Tours").WebEdit("password").SetSecure "4b479f621f87fae1041f347f40b269bdb8da6535"
Browser("Welcome: Mercury Tours").Page("Welcome: Mercury Tours").Image("Sign-In").Click 38,5
Browser("Welcome: Mercury Tours").Page("Welcome: Mercury Tours").Sync
Browser("Welcome: Mercury Tours").Page("Find a Flight: Mercury").Check CheckPoint("Find a Flight: Mercury")
Browser("Welcome: Mercury Tours").Page("Find a Flight: Mercury").Sync
Browser("Browser").Navigate "http://[Site Name]/mercuryreservation.php"
Browser("Welcome: Mercury Tours").Page("Find a Flight: Mercury").Check CheckPoint("Find a Flight: Mercury_2")
Browser("Welcome: Mercury Tours").Page("Find a Flight: Mercury").WebList("fromPort").Select "New York"
Browser("Welcome: Mercury Tours").Page("Find a Flight: Mercury").Check CheckPoint("Find a Flight: Mercury_3")
Browser("Welcome: Mercury Tours").Page("Find a Flight: Mercury").WebList("fromMonth").Select "December"
Browser("Welcome: Mercury Tours").Page("Find a Flight: Mercury").Check CheckPoint("Find a Flight: Mercury_4")
Browser("Welcome: Mercury Tours").Page("Find a Flight: Mercury").WebList("fromDay").Select "29"
Browser("Welcome: Mercury Tours").Page("Find a Flight: Mercury").Check CheckPoint("Find a Flight: Mercury_5")
Browser("Welcome: Mercury Tours").Page("Find a Flight: Mercury").WebList("toPort").Select "San Francisco"
Browser("Welcome: Mercury Tours").Page("Find a Flight: Mercury").Check CheckPoint("Find a Flight: Mercury_6")
Browser("Welcome: Mercury Tours").Page("Find a Flight: Mercury").WebList("toMonth").Select "December"
Browser("Welcome: Mercury Tours").Page("Find a Flight: Mercury").Check CheckPoint("Find a Flight: Mercury_7")
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 46,1
Browser("Welcome: Mercury Tours").Page("Find a Flight: Mercury").Sync
Browser("Browser").Navigate "http://[Site Name]/mercuryreservation2.php","","tripType=roundtrip&passCount=1&fromPort=New+York&fromMonth=12&fromDay=29&toPort=San+Francisco&toMonth=12&toDay=31&servClass=Business&airline=No+Preference&findFlights.x=46&findFlights.y=1","Content-Type: application/x-www-form-urlencoded" + vbCrLf + ""
Browser("Welcome: Mercury Tours").Page("Select a Flight: Mercury").Check CheckPoint("Select a Flight: Mercury")
Browser("Welcome: Mercury Tours").Page("Select a Flight: Mercury").Image("reserveFlights").Click 63,8
Browser("Welcome: Mercury Tours").Page("Select a Flight: Mercury").Sync
Browser("Browser").Navigate "http://[Site Name]/mercurypurchase.php","","fromPort=New+York&toPort=San+Francisco&passCount=1&toDay=31&toMonth=12&fromDay=29&fromMonth=12&servClass=Business&outFlight=Blue+Skies+Airlines%24360%24270%245%3A03&inFlight=Blue+Skies+Airlines%24630%24270%2412%3A23&reserveFlights.x=63&reserveFlights.y=8","Content-Type: application/x-www-form-urlencoded" + vbCrLf + ""
Browser("Welcome: Mercury Tours").Page("Book a Flight: Mercury").Check CheckPoint("Book a Flight: Mercury")
Browser("Welcome: Mercury Tours").Page("Book a Flight: Mercury").WebEdit("passFirst0").Set "dominic"
Browser("Welcome: Mercury Tours").Page("Book a Flight: Mercury").WebEdit("passLast0").Set "bowers"
Browser("Welcome: Mercury Tours").Page("Book a Flight: Mercury").WebEdit("creditnumber").Set "2222"
Browser("Welcome: Mercury Tours").Page("Book a Flight: Mercury").Image("buyFlights").Click 99,10
Browser("Welcome: Mercury Tours").Page("Book a Flight: Mercury").Sync
Browser("Browser").Navigate "http://[Site Name]/mercurypurchase2.php","","outFlightName=Blue+Skies+Airlines&outFlightNumber=360&outFlightPrice=270&outFlightTime=5%3A03&inFlightName=Blue+Skies+Airlines&inFlightNumber=630&inFlightPrice=270&inFlightTime=12%3A23&fromPort=New+York&toPort=San+Francisco&passCount=1&toDay=31&toMonth=12&fromDay=29&fromMonth=12&servClass=Business&subtotal=540&taxes=44&passFirst0=dominic&passLast0=bowers&pass.0.meal=&creditCard=AX&creditnumber=2222&cc_exp_dt_mn=None&cc_exp_dt_yr=None&cc_frst_name=&cc_mid_name=&cc_last_name=&billAddress1=1325+Borregas+Ave.&billAddress2=&billCity=Sunnyvale&billState=CA&billZip=94089&billCountry=215&delAddress1=1325+Borregas+Ave.&delAddress2=&delCity=Sunnyvale&delState=CA&delZip=94089&delCountry=215&buyFlights.x=99&buyFlights.y=10","Content-Type: application/x-www-form-urlencoded" + vbCrLf + ""
Browser("Welcome: Mercury Tours").Page("Flight Confirmation: Mercury").Check CheckPoint("Flight Confirmation: Mercury")
Browser("Welcome: Mercury Tours").Page("Flight Confirmation: Mercury").Image("home").Click 77,2
Browser("Welcome: Mercury Tours").Page("Flight Confirmation: Mercury").Sync
Browser("Browser").Navigate "http://[Site Name]/mercurywelcome.php"