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

How we know the qtp has used the smart identification process for identification of the object.

4 Answers   IBM,


I have qtp 9.5 demo ver,I am not able to record the yahoo broeser.so anyone can tell me what setting i have to do in QTP for yahoo brower recording. why its not recognise the object of yahoo browser????

0 Answers  


Give me detailed theritical explanation about keyword driven, hybrid framework, environment variables, hybrid frame work

0 Answers   TCS,


What is the extension of the recovery scenario file in qtp?

0 Answers  


Hi all Can u give me the link where we can download full version of qtp my mail id is karthic.venkitapathi@gmail.com

0 Answers  






In Manual testing , can u prpare bug report in TD?

1 Answers   TCS,


What is optional step in qtp? How you can add optional step in qtp?

0 Answers  


Is it possible to change the property value at runtime? How it is possible?

0 Answers  


How to Set the Global Sync Timeouts in QTP?

2 Answers  


what is output value in QTP and how it can be used in automation testing

0 Answers  


Extract a word from a sentenece?

5 Answers   IBM,


Hi, how can we retrieve a specific value from Excel Sheet (Not datatable. for externel file).i mean to say from .xls file. and also tell me from xml file and .doc file. and how can u parameterize ur script from .xls file.(Not data table).

2 Answers   Cap Gemini,


Categories