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
Tell us how can you create html test report from your test script?
What are the references for TSL functions.? Could anybody suggest me recommended book for Test Script Language.
Elaborate the situation where automation testing can’t be used for agile methods?
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)
What is test driven development?
Give some examples for performance test tools?
What are the risks associated in automation testing?
Is ui level testing possible?
If i am doing the automation of test suites in a project. Then what will be the system interfaces for that?? The tools I am using or something else... please help..!!
What is junit? And what is junit annotation?
What are the different types of testing framework techniques?
What are the things that one should consider for selecting a project for test automation? For example, stability, etc.
What is the deference between automation tools and management tools?
what is the difference between keyword driven frame work and data driven frame work.
Hi, I wanted to go with TestingDomain-Automation. Regarding this I need to take training on any one tool either WinRunner or LoadRunner. Which is better to get job,having future and takes lesstime with easier***. pls mention one tool name. Basically iam manual test engineer on unix- platform.