I Have web table shown below
----------------------------------------|
| orcut | GMAIL | NAUKRI |
|----------|---------|-------------------|
|HOT MAIL | MONSTER | VISIT FACEBOOK |
|----------|---------|-------------------|
|SKYPE ACC | IRCTC | GOOGLE |
---------------------------------------
Here i have 2 question friends..
1.i want to chick the link "VISIT FACEBOOK" is there or not
if it's there i want to click the link
2.here 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
Answers were Sorted based on User's Feedback
Answer / ganesh
One of the solutions is below:
It seems if VISIT FACEBOOK link/web element exists in 2,3
co ordication then below is one of solutinos.
Get the child object using ChildItems method from the 2
(row),3(col) using .ChildItems(2,3,"Link",0) if returns any
object then click on it.
E.g
Set objCh = Browser("A").Page("A").WebTable("A").ChildItem
(2,3,"Link",0)
If objCh.Count >0 then
objCh(0).Click
Else
Print" No link found"
End If
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / kapil
rCount=Browser("title:=ABC").Page("title:=XYZ").WebTable
("name:=Links").RowCount
For r=1 to rCount
cCount=Browser("title:=ABC").Page("title:=XYZ").WebTable
("name:=Links").ColumnCount(r)
For c=1 to cCount
oCount=Browser("title:=ABC").Page("title:=XYZ").WebTable
("name:=Links").Childitemcount(r,c,"Link")
For obj = 0 to oCount-1
Set cObject=Browser("title:=ABC").Page
("title:=XYZ").WebTable("name:=Links").childitem
(r,c,"Link",obj)
If cObject.GetROProperty("innertext")="VISIT FACEBOOK" then
msgbox "Link is there"
cObject.click
Endif
Next
Next
Next
set cObject=Nothing
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / manjunathareddy
1.Answer for 1st Question
" VISIT FACEBOOK" is the 1st Row 6th Column.
If Browser("Browser").Page("Page").WebTable("VISIT
FACEBOOK").ChildItem(1,6,"Link",0).Exist(5) then
Msgbox "Link Exist"
Browser("Browser").Page("Page").WebTable("VISIT
FACEBOOK").ChildItem(1,6,"Link",0).Click
Else
Msgbox "Not Exist"
End If
2.Answer For 2nd Question
Dim mytable,Row,Col
Set
mytable=Browser("Browser").Page("Page").WebTable("WebTable
Name")
Row=mytable.RowCount
Col=mytable.ColumnCount(Row)
Msgbox Row
Msgbox Col
Is This Answer Correct ? | 0 Yes | 0 No |
How to do the scripting. Is there any inbuilt functions in qtp as in qtp-s. What is the difference between them? How to handle script issues?
How to connect to a database?
Suggest and Define a solution for an application whose objects are not recognized by UFT?
Hoe to generate all numbers in between to numbers suppose all numbers in between 1 to 100 using vbscript give me code
Give me an example where you have used a COM interface in your QTP project?
normally by going through the object properties in object spy we write descriptive programming(correct me if i am wrong). But how or from where can we get the object properties in the object spy?plzzzzzz do answer
1)how to write test cases in test director? not go throuth requirments and plan but should be different way i need? 2)what is the mediator between qtp and application or project?
What is ‘object spy’ and what is the function of object spy in qtp?
How to send QTP scripts to our colleagues?
write a script for allinterview-submit Question first we've to select Choose Category,second select Sub- Category(Which is comes in to runtime)third select Question Type.for that give some descriptive and vb script
Explain the concept of Output values in Quick Test Professional?
How you can make an action as re-usable action?