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 will you format a number in percetage format in vbscript?
Please let me Know regarding any material regarding VB Scripting which should be easily understandable for Beginners.
Explain about tristate constants?
Mention what is byref and byval parameters in vbscript?
Mention how to create a cookie using vbscript?
What is the purpose of folders object of scripting.filesystemobject class in vbscript?
Which in-built function is used to format the number in the vbscript language?
Explain the tristate constants in vbscript?
How to open browser in vb script?
How will you get the octal value of the given number in vbscript?
Hai this is sheik, i want to learn VB scripts for web application pls guide me what are all basic things need to know to learn VB scripts in web application.
How you can call vbscript functions?
How do you declare a variable in vbscript?
How to declare an array in vbscript?
Explain about the extension .hta?