How can we use regular expressions for a table in web page,
each cell in table having unique identification, Now I want
to count number of rows in table and enter data in all
cells of the table?



How can we use regular expressions for a table in web page, each cell in table having unique ident..

Answer / ips

intRowCnt=Browser("Google").Page("title:=.*").WebTable(“name:= TTable").RowCount
For r=1 to intRowCnt
‘’ This will loop through each row and tell count of column in each row.
intColCnt=Browser("Google").Page("title:=.*").WebTable(“name:=TTable").ColumnCount(r)
MsgBox intColCnt

for c=1 to intColCnt
Browser("Google").Page("title:=.*").WebTable("WebTable").ChildItem(r,c,"WebList",0).Select strType
or
Browser("Google").Page("title:=.*").WebTable("WebTable").ChildItem(r,c,"WebEdit",index).Set strNumber
Browser("Google").Page("title:=.*").WebTable("WebTable").ChildItem(r,c,"WebCheckBox",index).Set strPreferred

Next
Next

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More QTP Interview Questions

Syntact for how to call one script from another? and Syntax to call one "Action" in another?

1 Answers  


Plz give the vb script for the following scenerio I have faced one issues while doing test in QTP. I have described the scenario below. 1. I have to test web application.In that i want to select from the drop down values in the application. 2. Suppose Drop down has 5 value "A,B,C,D,E".I would like to give value from data table of QTP. 3. For every iliteration it should select A,then B and so on

0 Answers  


How to handle the exceptions using recovery secnario manager in quicktest professional (qtp)?

0 Answers  


How to find the number the number of Links, Brolken Links in a webpage?

3 Answers   Ordain Solutions,


how to click on object? (with out knowing the object details) for ex: in a webpage one link is available.i want to click that link by using one menthod through qtp?

3 Answers   Zensar,






how interviews will be on QTP?

0 Answers   Fidelity,


How can I use the value retrieved by OUTPUT VALUE check point as Input for other Actions?

1 Answers   Motorola,


How does Parameterization and Data-Driving relate to each other in QTP?

2 Answers  


How comfortable are you in VB scripting?

2 Answers  


what is the purpose of .vbs file?

2 Answers   HCL,


write vbscript in qtp tool for senario, in the given sheet add each number in each row and each colunm and show result

3 Answers   Mind Q Systems,


explain all the check point in QTP?

1 Answers   BirlaSoft,


Categories