Hi
I have a doubt in qtp. Can you please clarify my doubt.
If we are importing the data from excel sheet in qtp the
the script is running the number of row times.
I mean if there are 4 rows in excel sheet the script is
running 4 times. cant we avoid this.
suppose i have tis script:
datatable.Import "C:\Documents and Settings\sailaja\My
Documents\login1.xls"
n = datatable.GetRowCount
For i =1 to n
systemutil.Run "C:\Program Files\Mercury
Interactive\QuickTest
Professional\samples\flight\app\flight4a.exe"
datatable.SetCurrentRow i
Dialog("Login").WinEdit("Agent Name:").Set DataTable
("Username", dtGlobalSheet)
Dialog("Login").WinEdit("Password:").Set DataTable
("Password", dtGlobalSheet)
Dialog("Login").WinButton("OK").Click
Window("Flight Reservation").ActiveX
("MaskEdBox").Type "020209"
Window("Flight Reservation").WinComboBox("Fly
From:").Select "Frankfurt"
Window("Flight Reservation").WinComboBox("Fly
To:").Select "Los Angeles"
Window("Flight Reservation").WinButton("FLIGHT").Click
Window("Flight Reservation").Dialog("Flights
Table").WinButton("OK").Click
Window("Flight Reservation").WinEdit("Name:").Set "Sailaja"
Window("Flight Reservation").WinButton("Insert Order").Click
Window("Flight Reservation").WinMenu
("Menu").Select "File;New Order"
window("Flight Reservation").Close
next
I created a excel sheet with 3 rows and 2 columns.
(username and password). The script is running 9 times. I
made the option run one itaration only . eventhough it is
running 9 times .can u plaese clarify my doubt.
Thankyou
Sailaja.
Answer Posted / sailaja
Hi Srikanth
Thankyou soo much. Now my script is running fine . Before I
did the same setting in keyword view->Action right click
Action call properties Run on all rows.But it did not
solved my problem . Once again thankyou soo much.
Regards
Sailaja.
Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Give the syntax to import/export xls into qtp.
Can I change properties of a test object?
What is the meaning Work bench?
What is the significance of “action 0” in qtp?
Connect to QC using AOM.
How to test background color and dynamic images during run time can you put the check point for moving objects?
What are the features supported by UFT?
what is the difference between IE & Netscape in web testing on a log in page
What is standalone database?
Hello, Is there any way to send the test results in html format (or any other) by email using outlook after the test run ends? thank you in advance
In what occasion we can specify global sheet and action sheet?
What are the different properties of an web object
Hi Friends, Would be great if you can provide the Model Question paper, Web site link or any reference s. Thanks & Regards, Byzoor,
Our company is having a windows client server application developed in vb.net. so there is a treeview and i am not in a position to record the click events in QTP. so kindly help. Vivek
what and how to answer for the question "tell me about yourself ?" for 3 years experience. can anyone say inj detail please... its urgent