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 |
hw to create a frame work in qtp..what are the basic steps
Hi,Sudhanandareddy plz forword framework and ppts for QTP to me. This is my mail id: ranjith_99reddy@yahoo.co.in (your contact number also)
How to parameterize Object Repository?
Diff. between keyword driven Data driven testing?
What is the difference between Action and Function.? when both has the same functionaltiy, when do we choose Action and when do we choose Function..??
3 Answers DST Global Solutions,
In descriptive programming how we know the properties of the objects, if application is not developed and the prototype of the application is also not developed.
Can UFT be connected to Quality Center? If ‘Yes’ brief the process or steps.
How can you capture(Read) the values from a Table?
Pls explain me the difference between ........ Description.Create and CreateObject
WHAT IS THE DIFFERENCE BETWEEN QTP SCRIPT AND VB SCRIPT? HOW MUCH PERCENTAGE WE USE IN QTP SCRIPT REAL TIME AND HOW MUCH PERCEN OF VB SCRIPT,,,,,,,
what is the difference between data table and spread sheet?
Can any one explain about environment variables with examples?