Hi , I am new to VBscripting, My requirment is to write a
vbscript to read a row (which has coloumns like
Description, Code, date(DD/MM/YY), hours etc) and export
these feilds to a Website and then click on Submit
Automatically on that web page. This it should do for all
the Rows in that excel file. Any help is much appriciated
Thanks
Shalini
Answers were Sorted based on User's Feedback
Answer / samrat
DataTable.AddSheet "qtpsht"
DataTable.ImportSheet path,"srcsheet","qtpsht"
rowcnt=DataTable.GetSheet("qtpsht").GetRowCount
For i=1 to rowcnt
datatable.Getsheet("qtpsht").Setcurrentrow(i)
'Invoke ur application
'get the test data and store in variables
StrDescription=DataTable.Value("Description",qtpsht")
StrCode=DataTable.Value("Code",qtpsht")
Strdate=DataTable.Value("date",qtpsht")
'apply the above variables into ur application and then
submit
'close ur application
Next
hope this meet ur rqmt..
crct me if iam wrong...
Is This Answer Correct ? | 5 Yes | 0 No |
Answer / pinki
Try this may work.
‘Invoke the your application, open the required page
Set objExcel = CreateObject("Excel.Application") '
Creates the Instance of Excel
objExcel.Workbooks.open “ Give the excel sheet
path" 'Opents the excel sheet from given location
objExcel.Visible = False
'***********Assigning the values to the variables
X = objExcel.ActiveSheet.UsedRange.Rows.count
For j = 1 to X
Desc = objExcel.ActiveSheet.Cells(j,1)
Code = objExcel.ActiveSheet.Cells(j,2)
Date = objExcel.ActiveSheet.Cells(j,2)
Hours = objExcel.ActiveSheet.Cells(j,2)
‘*********** Assign the values to Application variables
Browser().Page().WebEdit().Set Desc
‘
‘
‘
‘ click on sumbit
objExcel.Workbooks.close
Is This Answer Correct ? | 3 Yes | 0 No |
Suppose there are 10 browsers opened on desktop. I want to close all browsers except one browser in QTP. Can any one give the code for this?
DIFFERENT RUN MODE IN QTP..1-VERIFY MODE 2-UPDATE MODE 3- dEBUG MODE. My question is in whic sitution we use these modes Explain me with example
Hi,All How to create a link in excel sheet using qtp
when u script reveiwing in which area u more concentrates?
why was automation used in the project?
Hi..All I have installed QTP 10.0, and need to Automate SAP Application.....so i need to Install SAP Add-ins, anybady has SAP-Addins, Please help me, and thanks in advanced plese send it on my email id: sandipgami84@gmail.com Thanks, Sandip Gami +91-9714177088
In qtp is it possible to check broken links of a page?
What is the difference between functional spec. and Business requirement specification?
what is Synchronization point in QTP?Can anybody give a perfect example on it Thanks in advance
What is the Obect Repository type, we use in Automated Testing..in Real time.. Pls anybody can give the answer.. Thanks in advance...
How to define array in qtp?
Hi, While recording a Jave based web application, its recording all my actions and the objects.And I have 5 WebEdit objects on the page and all are recorded. But while execution, at the 2 WebEdit object, its entering the value into the object (Its making a call to the AJAX, matching the value), when the control get out of this object the value is erased or cleared. Could anyone please help. I have recoreded 5 more scenarios where WebEdit is in the picture on different webpages and all are working fine. Here is my Script: Browser("Sign In").Page("Matching Workbench_3").WebEdit ("locationLookup").Set "0320 - SEATTLE-KM" Browser("Sign In").Page("Matching Workbench_3").WebEdit ("supplierNameLookup").Set "TRAMMO PETROLEUM INC" *** SupplierNameLookup is the object, which is haing an issue. And also I was using the SendString function, but it didnt work.