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 |
Suppose if a functionalityis not mensioned in requirement document and but its present in application. will it be consider as a bug and viceversa?
On what basis we select test cases to automate?
How to launch application under test through VBscript without using systemutil.run or invokeapplication?
How should I get results when I run scripts in a Batch mode
.how will you load the object during runtime
Set DR= CreateObject("Mercury.DeviceReplay")
Name the properties you would use for identifying a browser and page when using descriptive programming?
How cookies can be tested in QTP?
what is the use of VIRTUAL OBJECTS? explain ?
10 Answers ABC Infotech, IBM, TCS,
when a test case is written how u test using qtp
can we call runaction in the funcion
what is the extension of action script template?