How to Import the data from MS-Access in QTP?
Answer / arunsingh
I will give you the example for retrieving the OrdrNo from
database using msAcess:
systemutil.Run "C:\Program Files\Mercury
Interactive\QuickTest
Professional\samples\flight\app\flight4a.exe"
Dialog("text:=Login").Activate
Dialog("text:=Login").WinEdit("attached text:=Agent
Name:").set "rajaputra"
Dialog("text:=Login").WinEdit("attached
text:=Password:").set "mercury"
Dialog("text:=Login").WinButton("text:=OK").click
Window("text:=Flight Reservation").Activate
For i=1 to 5
Window("text:=Flight Reservation").WinButton("window
id:=5").click
Dialog("text:=Open Order").Activate
Dialog("text:=Open Order").WinCheckBox("text:=&Order
No.").set "ON"
''''Till this you know. this is DP for getting the details
'''''of the order no. Now to get the order no from
'''''datatabase using MSACSESS follow the navigations
'Goto insert-output value-Database Out put value
'Select first radio button, and select check box maximum no
'of rows (say 5)-Next
'Select MSAcess Database,select C:\Program Files-Mercury
'Interactive-QuickTest
'Professional-samples-flight-app-flight32 database
'select Orders-Order No-Next-next-next-Finish
'click on the double click on order no one by one then Ok
'You will get ''DbTable("DbTable").Output
'CheckPoint("DbTable")''''' Line
a=datatable(i,1)
'msgbox a
Dialog("text:=Open Order").WinEdit("window id:=1016").set a
Dialog("text:=Open Order").WinButton("text:=OK").click
Pname=Window("text:=Flight Reservation").WinEdit("attached
text:=Name:","window id:=1014").GetVisibleText
msgbox "The Passenger Name of Order No "&a&" is "& Pname
Next
''''Run the program''''
| Is This Answer Correct ? | 2 Yes | 5 No |
How you automate testscripts one by one or moduelwise or all at once
what is the latest version of QTP? Main difference between 9.2 and 10 version
vb script for calling one function to the another function
What is source control?
WHO TAKE DECISION TO RELEASE THE BUILD
What are the views available in qtp?
normally by going through the object properties in object spy we write descriptive programming(correct me if i am wrong). But how or from where can we get the object properties in the object spy?plzzzzzz do answer
How to change the scripts from Per-Action object repository to shared object repository
what are the mandatory properties for a tex boxc (scenario?)
how can i pass a "cript"as a parameter in to a function
If I am scripting Web-based Surveys using QTP that open up differently but at the exact same point require a username and password can I automate that username and password for all the surveys some how using QTP?
What r the diffrernt file extentions in QTP?