hey please tell me how to retriev data from excel sheet
which puts the login name and password in the application?
plz send me the code..please help me
Answer Posted / rajani_kanth
Option explicit
Dim objExcel,objExcelSheet,row,col,i,j
Set objExcel=CreateObject("Excel.Application")
objExcel.Workbooks.Open("D:QTPdata.xlsx")
'objExcel.Application.Visible=true
Set objExcelSheet=objExcel.ActiveWorkbook.Worksheets("Sheet1")
row=objExcelSheet.UsedRange.Rows.count
col=objExcelSheet.UsedRange.Columns.count
For i= 2 to row
For j= 1 to Col
' Print objExcelSheet.cells(i,j).value
InvokeApplication"C:Program Files (x86)HPQuickTest Professionalsamplesflightappflight4a.exe"
wait 1
dialog("Login").WinEdit( "Agent Name:").Set objExcelSheet.cells(i,j).value
wait 1
J=J+1
dialog("Login").WinEdit("Password:").Set objExcelSheet.cells(i,j).value
WAIT 1
DIALOG("Login").WinButton("OK").Click
wait 1
window("Flight Reservation").Close
wait 1
Next
Next
objExcel.Workbooks.Close
objExcel.Quit
Set objExcelSheet=Nothing
Set objExcel=Nothing
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
how to increase the values in text box in a given text box increament by two values by clicking on button
Hi Friends, I have an issue like the describe below: I'm using QTP and I'm testing on SharePoint. As you knoe, SharePoint has a customize function for user, so that, If I add an object Web Table at the first time, that object was recognized by "index" and "html tag", after that, if someone change the display of web part, the "Index" of my object was changed as well and QTP unable to select that Web Table. Can you guide me how to identify or anyway to keep that Web Table object as unique object? Thanks a lot.
hi what is called GUI in QTP 8.2 and how can we test the apllication using GUI?
Hello Guys, If any body looking for "worksoft certify tool training in bangalore", please contact me aimansaud@gmail.com
Which function is used to perform string comparison?
Mention what are the rules to name variable in vbscript?
Which in-built function is used to format the number in the vbscript language?
Program to use input box and send even numbers into sheet1 and odd numbers into sheet2 and prime numbers into sheet3 using vbscript(QTP)?
i am having some basic knowledge in c and VB 6.0. i qtp i want to know how to write the codings. by recording it is generating lot of codings. for example i want to test the text box. senerio is text box should not accept alphabets if it accept alphabets we should return fail status if it get number we should return pass status. how to write coding in vb script please help me
Which command is used for writing text on a page?
how to comvert 120 into one hunderd twenty rupees only and vice varsa
Why is it recommended to close the database connection every time after the work is completed?
wat is the com(common object model)object for mozilla firefox???????plz if any one know the exact answer....reply me......
Hi Friends my Question is very simple,in Manual testing when we click on a hyper link it directs us to the relavent page or it re-directs us to the current page,so there we can easily write testcase but same thing if we do in automation script using QTP & need to generate report using Reporter.report event how we will do it?thanks in advance...
how to increasing the numbers in a given text box please write a vb script