I am using mercury functional testing tool-Quick Test Professional to record flight reservation page. QTP will generate VBScript in expert view. I added in table check points and text check points in the script. The script suppose to run in three iterations correspond to three departure cities in the data table.
--The purpose of this hands-on exercise is to let user generate output values from application and compare actual results stored in the data table with expected results.
--The script runs ok first time, it extracted outbound flight fares into data tables. But When I run it second time, I encountered a run error. It fails at second iteration. It stops at sign-in page.
The error message says:
the error message is like this:
Run error: under action1 Summary
--> Welcome: Mercury Tours
object: Run Error
details: can not indetify the object "fromPort" (of class Weblist). Verify that this
object's propertyies match an object currently displayed in your application.
line(5): in expertview browser(welcome: Mercury Tours").page("Find a Flight Mercury).weblist.
I think that I need to add a loop structure (Do..Loop) in the script so it can access select flight page three times. I post my script here, please give me some advise on where this loops should be and any necessary functions I need in order to run this script successfully.
-- I also want to know is there any good reference books or web resources focus on using VBScripts to do automation (work with QTP functional testing too will help me a lot)
--Where I can download Microsoft Script debugger for free?
I am new to VBScripting. Hope some VB gurus can give me some advises. I appreciate your help!