I want to assign values in a table in my software, in first column i will give values, table is of 4x4 i.e 4 row and 4 columns, i m using VBScript in my automation work. it is a simple table for giving values.

Answers were Sorted based on User's Feedback



I want to assign values in a table in my software, in first column i will give values, table is of 4..

Answer / sisira

set wbtable=Browser(“micclass:=Browser”).Page(“micclass:=Page”).WebTable(“name:= TTable")
no_row=wbtable.RowCount
no_columns=wbtable.columnCount
strobjType ="WebEdit"
For introw=1 to no_row-1
For intcol=1 to no_columns-1
Set ChldItm = wbtable.ChildItem(introw,intcol,strobjType ,0)
If ( strobjType ="WebEdit") Then
ChldItm.set "value"& introw&intcol
End If
next
next

Is This Answer Correct ?    0 Yes 0 No

I want to assign values in a table in my software, in first column i will give values, table is of 4..

Answer / pravinkumar

Set exc=createobject("Excel.application")
set a=exc.Workbooks.Open("C:Documents and SettingspravinkumarmDesktopNew Folderpra.xls")
Set s=exc.Worksheets.Item ("sheet1")
exc.Cells(1,1)="Hello"
Exc.Cells(1,2)="Welcome"
Exc.Cells(2,1)="Hi"
Exc.Cells(2,2)="Jim"
exc.ActiveWorkbook.Save
'a.Save
exc.Quit
Set a=nothing
Set s=nothing

Is This Answer Correct ?    0 Yes 1 No

I want to assign values in a table in my software, in first column i will give values, table is of 4..

Answer / pravati

Datatable.Getsheet(id)
Datatable.value(4,4)=values

Is This Answer Correct ?    0 Yes 1 No

I want to assign values in a table in my software, in first column i will give values, table is of 4..

Answer / pravati

Datatable.Getsheet(id).setcurrentrow(4)
Datatable.value(shtid,4)=value

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More QTP Interview Questions

In qtp, explain what is keyword driven automation framework?

0 Answers  


How to save your test using quicktest professional (qtp)?

0 Answers  


Explain the concept of object repository?

0 Answers  


Difference between image checkpoint and bitmap checkpoint

4 Answers  


what we do after completion of functional and regression testing

2 Answers  






what is use of the object repository?

4 Answers  


Consider a scenario where there are two action sheets say action 1 and action 2. Can Action 1 take values from action 2 data sheet or vice versa. If so, how?

6 Answers   Oracle, TCS,


Tell me one scenario, the complex functionality you have automated in your project?

0 Answers  


How to Identify broken links in QTP

2 Answers   Ness Technologies,


Does quicktest professional (qtp) is unicode compatible?

0 Answers  


In QTP for .net application which plug in is used? For Java Application which plug in is used ?

2 Answers   AppLabs, Fraze Tech,


What is our exact stage involvement with QTP?

1 Answers  


Categories