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

What are the different properties of an web object

0 Answers  


X=10,Y=20 you need to swap the numbers without using a third variable?

5 Answers  


Define Error Pane of UFT?

0 Answers  


what difference between runtime object and text object and what property they have. whether they have same properties or different properties.

0 Answers   Intel, Satyam,


how can i use text check point in descriptive programming. or else is there any way to compare the text in the application and the text in data table.

2 Answers  


How do you check ticket cost and ticket number in flight application?

0 Answers  


I have made the recovery scenario in script. When i am exceuting the script. it stop automatically after running recovery scenario. Please tell the resaon?

2 Answers  


Hi Friends...this is surendra..recently i joined automation team ...Please send me some documents regarding VB script ...and where can i learn VB script... This is My mail id: surendra.mamilla@gmail.com... please send to my mail.... Thanx in advance surendra.

1 Answers  


Are You using any frame work? What is that? Explain about that.

4 Answers   Wipro,


how can i parameterize a login page by using database parameterization i fetch the username and password from database and put this on login page and click on ok button. so how can we write script for that code please let me know asap thanks

4 Answers   iCreate,


Does UNIX support QTP? If not what is the other tool used for Unix environment?

2 Answers   Amdocs, Fidelity,


how we connect oracle or sql data server database to qtp. Hi Ram I was your answer for this. Can you kindly let me know in details steps on How we can connect to database. i am using QTP9.2 and SQL Server Database. I am new for QTP and this would be of great help.Thanks

2 Answers  


Categories