Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

Do you know what is robot api?

950


Does every software project need testers?

958


Tell me which web driver implementation is the fastest?

948


what is aom and how to add object repository? i am very new to QTP please help me

1912


Tell me what is the firefoxdriver, class or an interface? And which interface does it implement?

859


Anyone aware of Test Runner (ETL Automation Testing tool) if so please help me with material in keerthi.smile14@gmail.com

1520


Once you identify the tool what would be your next steps?

973


WHAT'S THE TESTER'S ROLE DURING MIGRATION OF CODE FROM TESTING TO PRODUCTION ENVIRONMENT

2234


What are the phases in automation testing life cycle?

959


On what factors can you map the success of automation testing?

987


Give some examples for performance test tools?

1017


When you will not automate testing?

1010


What is a critical bug in a testing field?

1075


1. How would you Test & then automate an antivirus application? 2. How would u test & automate windows screen saver? (expected: "test scenarios" & "test approch": points)

2083


Do you know what is selenese?

1067