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
1. How do declare public variable in vb scripts?
Plzzzzzzz can any one tell me which is the best institute in hyderabad for learing VBScript. plz do answer guys its urgent plzzzzzzz. thanks in advance.
Explain the scope of the variables using dim, public, and private keywords respectively.
Sub link() Dim k As Integer Dim rand As Integer Dim URL As String Dim foldernum As Integer Dim folderstring As String Dim filenum As Integer Dim filestring As String k = 1 'for AC Numbers For i = 11 To 40 foldernum = 0 foldernum = 1000 + i folderstring = CStr(foldernum) folderstring = Mid(folderstring, 2, 3) folder = "ac" & folderstring 'folderstring = Sheets(2).Cells(i, 1) ' for Number of Random files For j = 1 To 10 rand = Int(Rnd * (200 - 1) + 1) filenum = 0 filenum = 1000 + rand filestring = CStr(filenum) filestring = Mid(filestring, 2, 3) 'URL = "http://ceobihar.nic.in/PSCDROM/ac" & folderstring & "/i" & folderstring & "0" & filestring & ".pdf" URL = "http://www.elections.tn.gov.in/pdfs/dt1/" & folder & "/" & folder & filestring & ".pdf" ' URL =http://www.wb.nic.in/wbeco/EROLLS/PDF/English/A001/a0010105 .pdf Cells(k, 1) = folderstring Cells(k, 2) = folder Cells(k, 3) = filestring Cells(k, 3) = URL k = k + 1 Next j Next i End Sub plz define it
Hi anyone Can Send Solution to the Question wt m posting now Prepare Script for the Bellow Scenario? Login to Gmail Page Open Inbox check Mails save them in a Folder
Mention what is the difference between vbscript and vba?
How are values assigned to the variables in the vbscript language?
Explain few date functions in vbscript?
why do u choose to go for testing why cant for devoloping
what do you mean .ota mobile format
How you can call vbscript functions?
If a calulator having 3 buttons (of any number)in 3 of them one is not working properly due to which answer is wrong always. write a script to find out which button is not working properly ?
Explain about adodb.stream class?
Explain the adodb.stream class?
How to identify column in VSFlexgrid? My VSFlexgrid window is identified as 'Active X Control'