hai friends i already ask this question but when i post the
question the alignment goes wrong .....my question is we
have a WEB TABLE ....assume that web table having 3 row's
and 3 column here in 2nd row 3rd column having VISIT
FACEBOOK link...now i want to check the VISIT FACEBOOK link
is available or not ..if it's there i want to click the link
...then how to find the web table row or column count
....don't write the excel or data table script here friends
.....consider that it's a WEB TABLE do a favour ...thank's

Answers were Sorted based on User's Feedback



hai friends i already ask this question but when i post the question the alignment goes wrong .......

Answer / mogal

Set OWT = Browser(" ").Page(" " ).WebTable( " ")
CC = OWT.ColumnCount
GetRNum = OWT.GetRowWithCellText("VISIT FACEBOOK")
For j =1 to CC step 1
If OWT.GetCelldata(GetRNum,j) = "VISIT FACEBOOK" Then
GetCNum = j
Exit for
End If
Next
Set Link1 = OWT.ChildItem(GetRNum,GetCNum,"Link",0)
Link1.Click


(or)
Set OWT = Browser(" ").Page(" " ).WebTable( " ")
RC = OWT.RowCount
CC = OWT.ColumnCount (1)
For i =1 to RC
For j= i to CC
If OWT.GetCellData(i,j) = "VISIT FACEBOOK" Then
GetRNum = i
GetCNum = j
Exit for
Exit for
End If
Next
Next
Set Link1 = OWT.ChildItem(GetRNum,GetCNum,"Link",0)
Link1.Click

Is This Answer Correct ?    1 Yes 0 No

hai friends i already ask this question but when i post the question the alignment goes wrong .......

Answer / ram

Hi,
You can use GetTableFromElement by putting in loop.

Let me know if you want code.

Ram

Is This Answer Correct ?    0 Yes 0 No

hai friends i already ask this question but when i post the question the alignment goes wrong .......

Answer / pravati

Rowcount=B().P().webtable().getrowcount
for i=0 to Rowcount-1
msgbox i,..it willshow u no of rows
next
clmncnt=B().P().webtable().getcolumncount
for j=0 to clmncnt-1
msgbox j,....it will show u no of columns
next
B().P().webtable().Getcelldata(2,3).click
wait 2
if B().p().link().exists then
msgbox " link exists
else
msgbox "link doesnot exists"

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More QTP Interview Questions

Where we use data driver in qtp?

0 Answers  


WHICH PROCESS U FOLLOW IN COMPANY

1 Answers   IGT,


Hello Everybody, please tell me how to use accessibility checkpoint and XML checkpoint by giving any practical example of it.please provide me the steps to perform that and also pls provide the code too. Thanks in advance, Gaytri

1 Answers  


action contains public and private functions but do we resuable that action or not..If it is reusable How..plz tell me the ans

0 Answers   TCS,


How to find the difference between 2 dates in qtp?

0 Answers  






when do we write a script in qtp?(plz give me more then 2 reasons)

1 Answers  


How can we use the "CreateObject ("Scripting.FileSystemObject")" in QTP and what is the definition and purpose of it?

2 Answers  


Pls can anyone give me the descriptive programing script to find the number of edit boxes in a login window in flights reservation (windows application only not web). Pls anyone, very urgent

1 Answers  


diff between winrunner and qtp

1 Answers   Wipro,


What is a Run Time Data table?

1 Answers  


How do you start automating/ writing your QTP scripts ?

3 Answers   Keane India Ltd,


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

2 Answers   Syntel,


Categories