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

Explain in brief about the qtp automation object model (aom).

0 Answers  


Will down time for server and content maintenance/upgrades be allowed? how much?

0 Answers  


Discuss QTP Environment.

1 Answers  


If object is not recognized by qtp but the object is standard object what is your approach?

0 Answers  


what is the diffrence bw qtp architectute and qtp framework?

0 Answers  


What is output value?

3 Answers  


Hi,EXCEL SHEET AND DATA TABLE . BOTH ARE SAME OR NOT?

3 Answers  


What are the problems / difficulties faced when you used Smart Identification ?

2 Answers   Keane India Ltd,


Problem with XML checkpoint in QTP ?

0 Answers  


what is descriptiveprograming? how to do object identification thrugh Descriptive and is possible smart identification or not

5 Answers   Syntel,


can any one tell me how to select some text.i need the script for that

1 Answers  


how could i download qtp in which i get add-in support for 'oracle' is there any way to get it? i finding but not getting pls help me out :)

0 Answers  


Categories