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
Do you know what is robot api?
Does every software project need testers?
Tell me which web driver implementation is the fastest?
what is aom and how to add object repository? i am very new to QTP please help me
Tell me what is the firefoxdriver, class or an interface? And which interface does it implement?
Anyone aware of Test Runner (ETL Automation Testing tool) if so please help me with material in keerthi.smile14@gmail.com
Once you identify the tool what would be your next steps?
WHAT'S THE TESTER'S ROLE DURING MIGRATION OF CODE FROM TESTING TO PRODUCTION ENVIRONMENT
What are the phases in automation testing life cycle?
On what factors can you map the success of automation testing?
Give some examples for performance test tools?
When you will not automate testing?
What is a critical bug in a testing field?
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)
Do you know what is selenese?