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

what is exit and entry criteria of automation testing. any body wants a real time script,please mail to me. contactno;9986435766

2 Answers  


what is the script for keyword driven framework in real time?plz its urgent

1 Answers   Accenture, CTS,


Can i run the qtp, without OBJECT REPOSTIRY...

8 Answers  


what is database check point, how will you parameterize the database from seperate data table?

2 Answers   JPMorgan Chase,


How to change the scripts from Per-Action object repository to shared object repository

1 Answers  


How to check and display a particular word from a paragraph?

1 Answers  


how can we group that these test cases only should be automated and in which order you execute that test cases?

2 Answers   BSL,


There is a table with 4 columns and 10 rows, how to write the script to display the first column records using qtp? can anybody help me with script?

6 Answers   Oracle,


A web page has two butons with same properties and rotating in clockwise direction. how to click on any of the button?

2 Answers   Virtusa,


How to parameterize Object Repository?

2 Answers  


what is the long form of QTP ?

2 Answers  


How to load a object repository(using VBScript) ... very urgent....

4 Answers  


Categories