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 |
why do we use both location and index identifier.
Name the properties you would use for identifying a browser and page when using descriptive programming?
how to make connection to a remote mysql database in qtp any one can please provid eme deatail steps.
How we test the logo or images in the web page using QTP? For example take google page, they change their logo for new year,christmas etc..How we test that? Plz answer this question... Thanks in advance..
In google i'm going to search something like "rose", i usually get 10 results in the first page and in 2nd page 10 results and in 3rd 10 results so on upto 10th page 10 results. so if i want to open all the 10 pages 10 results i.e., 100 results and close..what is the DP for this? pls can anyone answer my Question..PLZZZZZ...
Hi iam shankar here, right now iam working on manual testing. i want to switch over automation tool qtp, right now iam taking training class outside on qtp, please let me know the cost of QTP tool for full version, wether it's an annual subscription or monthly subscription.
How can we use the "CreateObject ("Scripting.FileSystemObject")" in QTP and what is the definition and purpose of it?
Define virtual object?
How can we count the no of rows are available in a data table ?
How can you give wait up to 10 seconds in qtp?
I came across Good question ..... Write a script to only download pdf's if there are 20 links on a page. Kindly reply these type of questions are pretty challenging..
If I give some thousand tests to execute in two days what do you do?