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



I Have web table shown below ----------------------------------------| | orcut | GMAIL | NAU..

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

I Have web table shown below ----------------------------------------| | orcut | GMAIL | NAU..

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

I Have web table shown below ----------------------------------------| | orcut | GMAIL | NAU..

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

Post New Answer

More QTP Interview Questions

What is Distributed testing? How does UFT support it?

0 Answers  


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?

1 Answers   Wipro,


How to check feasibility of the appliction?in automation testing?

0 Answers   CTS,


How to call a function in QTP?Is there any method ? Thanks , PRASANNA

2 Answers  






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?

13 Answers   Logica CMG,


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

2 Answers  


What is repository parameters in QTP?how will we define that????what is unmapped & mapped repository parameters????????

1 Answers  


i can done the project with QTP in that time i can say how many members in my team size?

0 Answers  


HOW TO AUTOMATE CAPCHA IMAGES while creating Gmail account

2 Answers   TCS,


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?

2 Answers  


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

0 Answers  


Categories