I have a web page.In that i have two links called "gmail"
and "gmail". Both links are look same.One link is at top of
the page and other link is at bottomn of the page. How the
automation tool can be recognized these link and make to
click the link i want?

Answers were Sorted based on User's Feedback



I have a web page.In that i have two links called "gmail" and "gmail". Both lin..

Answer / uday

Why cant you use index or location property.

By default, index=0 for the first object and index=1 to the
second object.

Is This Answer Correct ?    5 Yes 0 No

I have a web page.In that i have two links called "gmail" and "gmail". Both lin..

Answer / kalt

Hi, If you are looking for the solution form selenium, then
you can use the xpath to click on that link.

Is This Answer Correct ?    4 Yes 0 No

I have a web page.In that i have two links called "gmail" and "gmail". Both lin..

Answer / mohammad murtuza ali

we have to give a tool tip to identify which link is
redirecting.
by this it is possible

Is This Answer Correct ?    3 Yes 1 No

I have a web page.In that i have two links called "gmail" and "gmail". Both lin..

Answer / shamsher singh

Object repository have details about both link . when e
write test cases we can use these details(properties of the
Object) and recognize the link at run time.

Is This Answer Correct ?    1 Yes 1 No

I have a web page.In that i have two links called "gmail" and "gmail". Both lin..

Answer / kamakshya

Using "Index" ordinal identifier


SystemUtil.Run "iexplore.exe","google.com"
Browser("title:=Google").Page("title:=Google").WebEdit
("name:=q").Set "QTP script"
Browser("title:=Google").Page("title:=Google").WebEdit
("name:=q").Submit
Wait(5)
Browser("name:=QTP script - Google Search").Page
("title:=QTP script - Google Search").WebButton
("name:=Search","index:=0").Highlight
wait(5)
Browser("name:=QTP script - Google Search").Page
("title:=QTP script - Google Search").WebButton
("name:=Search","index:=1").Highlight

Important Note: Interchange the index value and run the
test and observe how the ‘Search’ Button is working.
*********************************************
Using ‘Location’ Ordinal Identifier

SystemUtil.Run "iexplore.exe","google.com"
Browser("title:=Google").Page("title:=Google").WebEdit
("name:=q").Set "QTP script"
Browser("title:=Google").Page("title:=Google").WebEdit
("name:=q").Submit
Wait(5)
Browser("name:=QTP script - Google Search").Page
("title:=QTP script - Google Search").WebButton
("name:=Search","Location:=0").Highlight
wait(5)
Browser("name:=QTP script - Google Search").Page
("title:=QTP script - Google Search").WebButton
("name:=Search","Location:=1").Highlight

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More Automation Testing AllOther Interview Questions

hi Friends this is Srinivas. Can u discribe about bug lifecycle.how to say in interview.send me my mail :dsrao106@gmail.com

5 Answers   Wipro,


what are test metrics

1 Answers  


What is the Driver sheet??

1 Answers  


Do you know what is the purpose of deselectall() method?

0 Answers  


What are different coverages in function testing?

0 Answers  






Explain me what is a framework and what are the frameworks available in rc?

0 Answers  


What could go wrong with test automation?

1 Answers  


Which is the best place to learn Loadrunner performance testing in hyderabad ?

0 Answers  


What you know about table-driven testing?

0 Answers  


Which testing tool can be used for a window base application. My application is a WPF window application, which testing tool i can use to test this application?

1 Answers  


What are the important modules of an automation testing framework?

0 Answers  


What are software testing metrics

4 Answers   MBT, Persistent,


Categories