what is the script(qtp) to export and import the datas from
MSaccess to Excel sheet.if anybody know plz tell me.
Answer Posted / king
Set a=createobject("adodb.connection")
Set b=createobject("adodb.recordset")
a.provider="microsoft.jet.oledb.4.0"
a.open "E:\raju\login.mdb"
b.open "select * from login",a
i=1
Do while not b.eof
If not dialog("Login").Exist(2) Then
invokeapplication "C:\Program Files\Mercury
Interactive\QuickTest
Professional\samples\flight\app\flight4a.exe"
End If
dialog("Login").WinEdit("Agent Name:").Set b("User
name")
wait(1)
dialog("Login").WinEdit("Password:").Set b
("password")
dialog("Login").WinButton("OK").Click
datatable.SetCurrentRow(i)
datatable(1,1)=b("User Name")
datatable(2,1)=b("password")
wait(1)
If dialog("Login").Dialog("Flight
Reservations").Exist(1) Then
dialog("Login").Dialog("Flight
Reservations").WinButton("OK").Click
datatable(3,1)="Fail"
dialog("Login").WinButton("Cancel").Click
else
datatable(3,1)="Pass"
Window("Flight Reservation").Close
End If
i=i+1
b.movenext
Loop
datatable.ExportSheet "E:\raju\db.xls",1
i think this is working properly
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
With what extension you can save the list of tests in a file to run in test batch runner?
What is the parameterization?
what frame work you are following?
In order to select an automation tool for automating ur application, what r the things u need to consider? For eg i will go for automation; 1) When there is a lot of retesting and regression testing. 2) Return on investments. 3) Whether the tool supports the appln. 4)--------------, etc. Pls give me more number of points because my answer did not satisfy the interviewer. Very urgent pls
How to find array size in qtp?
What are the types of object repositories? Which one is you using?
i have doubt suppose iam purly working in manual, when i will get work to do on sql and performence testing? pls any one clarify doubt?
How to carry out bit map check points in QTP
What is the extension of the recovery scenario file in qtp?
Hello friends..... On which areas of an application we can not test with QTP
what is the mail use of frame work(with detail). architecture for keyword driven frame work
Write the script to delete the mail which is at 9th,13th and 18th place in INBOX of Gmail ?
How can you close the second opened browser?
When we r doing data driven test with chkpts, i want to insert formulae in data sheet but i didn't get. How we wil do that plz. explain in detail.
How did you resolve conflicts present in Object Repository?