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

what is flag=0 in qtp tool.. i am strugglin to use flag function , exactly when it is used , any real time expert pls explain clearly?

1 Answers  


how to lunch the application in the qtp tool ?

3 Answers  


Hi.. I want to do parametrization for selecting perticular flighr say XYZ by using local table: criteria: 1.If flight is available msgbox "Flight is available" and then select flight from flight table and click to ok button after that as enter username and ticket no and then stop 2. otherwise msgbox " Flight is not available" and stop Please help me out ..and let me know your responses on dipak.bachhav@gmail.com Regard, Dipak

0 Answers  


In real time ,How to run all scripts in QTP? i,e in projects

3 Answers  


I m in new and want to learn QTP. Is any website which provide free QTP video training.....also can downlaod....

3 Answers   Wipro,






Error handling

3 Answers   Wipro,


How to do Batch run in qtp? provide the steps?

5 Answers  


What are the types of object repository in qtp?

0 Answers  


what are the utilities and drivers

0 Answers   Cap Gemini,


Batch testing in howmany ways u perfrom in QTP

3 Answers   Lehman Brothers,


How do you delete unwanted results in qtp?

0 Answers  


we have one text box and one list box(list box appear in same page or another page) what ever the text enter in text box that must be displyed in list box as first one. for example if we enter 10 in text box that is the 1st item in list box . after that we enter 11 then 11 is the 1st item and 10 is 2nd item. the maximum limit of list box is 10 items. if we enter 11th item the 10th item is deleted and llth one is add as 1st one and 9th one goes to 10th position

3 Answers   Covansys,


Categories