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 |
What is Distributed testing? How does UFT support it?
for example u can take ebay or plifcart online shoping web application--------- write acode in vbscript in qtp---- search box and write (iphone6)and click on go button then opened diff prise iphones in next page but u can select 30,000 to 90,000 list pls write code?
2 Answers FFASVA, Genpact, Wipro,
PLZ EXPLAIN HOW TO LAUNCHING QTP IN TEST DIRECTOR? Is it possible or not? If No Why we r using qtp Td Combination? plz explain briefly? What is the purpose of TD With QTP?
How to check feasibility of the appliction?in automation testing?
How to call a function in QTP?Is there any method ? Thanks , PRASANNA
for a test in QTP i had choose the object repository as shared.after completion of some days i want to conduct the same test again,now the question is HOW TO LOAD THE OBJECT REPOSITORY. is it possible by descriptive programming.could any one tell me how many ways we load it and what is the process?
I want to open a text file and then search some specified text in it and then replace that text with some other text i found that text in .txt but do not know how to replace that text can any body help me. if possible put the code for qtp
What is repository parameters in QTP?how will we define that????what is unmapped & mapped repository parameters????????
i can done the project with QTP in that time i can say how many members in my team size?
HOW TO AUTOMATE CAPCHA IMAGES while creating Gmail account
if i want to check text on the status bar how to test is i need the report also after getting the result weather it is matched or not?
Hi All, I have a problem with getting the value which is available in the table and it is not having any unique property. Please find the below table TopicName CreatedBy ViewCount ------------------------------------------------ XXXX Y 10 ZZZZ ZZ 0 AAAA BBB 3 In the Above table TopicNames are link and it is having an id but the remainig two columns(Created by and ViewCount) are static Web element values and they are not having any unique property. Now i want to get the values of Created BY and View count for each and every topic. Can anybody give me the solution for the above ASAP. If anybody didn't understand the above please free to send me a mail by that i can send you the snap shots and some more description. You can catch me at krishnachand.p@gmail.com