how can we perform web datatable operations on webpages(Like
rowcount,col count,cell data)?

Answers were Sorted based on User's Feedback



how can we perform web datatable operations on webpages(Like rowcount,col count,cell data)?..

Answer / deepika

n=Browser("BName").Page("PName").WebTable("TName").RowCount
print n
This will display the number of rows in a web table
m=Browser("BName").Page("PName").WebTable.ColumnCount
(Rownumber)
print m
This will displap the number of Columns for that particular
Row
a=Browser("BName").Page("PName").WebTable
("TName").GetCellData(Rownumber,ColNumber)
print a

Is This Answer Correct ?    8 Yes 0 No

how can we perform web datatable operations on webpages(Like rowcount,col count,cell data)?..

Answer / ram.polavarapu

r=browser("").page("").webtable("").RowCount
print r
'this will display the number of rows in webtable
c=browser("").page("").webtable("").ColumnCount
print c
'this will print the number of column in webtable
for i=1 to r
for j-1 to c
a=browser("").page("").webtable("").GetCellData(i,j)
print a
this will display the all data in the web table

Is This Answer Correct ?    2 Yes 0 No

Post New Answer

More QTP Interview Questions

What is the significance of “action 0” in qtp?

0 Answers  


What is test harness?

2 Answers  


I am testing a website TheLancet in qtp 9.2 and running a script but its not working.Tell me if m doing anything wrong in the script. If Browser("TheLancet.com - Home Page").Page("TheLancet.com - Home Page").Link("Clinical").exists then msgbox "object exist" Else msgbox"object doesnt exist"

2 Answers   Rolta,


Hi All, I wanted know how does QTP identifies a DataCombo. While recording I clicked on the data combo and selected a value from the list. The click of Data Combo is recorded but the selection of the value from the list is not recorded. My application is based on VB and SQL server as the database. Please let me know as how do I record the action of selecting a value from a DataCombo list. The list is being loaded from the Database Record set.

0 Answers  


What are the different types of recording modes in qtp? Which will be used when?

0 Answers  






Whether it is possible to test the adobe's controls like zoom, resize, save etc using QTP...If yes, how u can do the same?

1 Answers  


How to pass a variable in Dos Command using QTP? Eg: Dim path1, path2 path1 = "C:\Test\sample1.doc" path2 = "C:\Test\sample2.doc" How can we pass these path1 and path2 inside the "copy" dos command? I tried like this. this is not working. oShell.run "cmd /K copy" &path1 &path2

1 Answers  


Please mail me the license key of QTP 9.5 t v.sadangi@gmail.com ????? thx

0 Answers  


What is difference between version 6.5 and 8.2 in QTP?

0 Answers  


what is run-time data?

0 Answers  


Hi any body can tell me the synchranization point syntax thanks in advance

6 Answers   AppLabs,


what is the difference between IE & Netscape in web testing on a log in page

0 Answers   TCS,


Categories