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



Hi , I am new to VBscripting, My requirment is to write a vbscript to read a row (which has coloum..

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

Hi , I am new to VBscripting, My requirment is to write a vbscript to read a row (which has coloum..

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

Post New Answer

More QTP Interview Questions

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?

7 Answers   IBM,


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

1 Answers  


Hi,All How to create a link in excel sheet using qtp

0 Answers  


when u script reveiwing in which area u more concentrates?

0 Answers   IBM,


why was automation used in the project?

1 Answers   Google,






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

1 Answers  


In qtp is it possible to check broken links of a page?

0 Answers  


What is the difference between functional spec. and Business requirement specification?

5 Answers  


what is Synchronization point in QTP?Can anybody give a perfect example on it Thanks in advance

5 Answers  


What is the Obect Repository type, we use in Automated Testing..in Real time.. Pls anybody can give the answer.. Thanks in advance...

5 Answers   Navis,


How to define array in qtp?

0 Answers  


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.

0 Answers  


Categories