There are some links on the web page,write a script to
count and click those links and check the text on the page
displayed on clicking the links.
Answers were Sorted based on User's Feedback
Answer / 86kris
I agree with the answer by preethi. I guess there should be a small change in the "For loop"
It has to be
For i=0 to countLinks - 1
Rest everything is fine.
Kindly correct me if i am wrong!
Is This Answer Correct ? | 7 Yes | 0 No |
Answer / preethi
Set obj=Description.Create()
obj("micclass").value="Link"
Set links=Browser("Gmail: Email from Google").Page("Gmail: Email from Google").ChildObjects(obj)
countLinks=links.Count
msgbox "Num of links"& links.Count
For i=0 to countLinks
'links(i).click
text= links(i).GetROProperty("Text")
msgbox text
'Browser("Gmail: Email from Google").Page("Gmail: Email from Google").ChildObjects(obj).
next
Is This Answer Correct ? | 3 Yes | 1 No |
Answer / xyz
The question here is to verify the text on the "page" after
clicking the link. I believe the above code will display
the text of the link. Please correct me if I am wrong.
Thank you.
Is This Answer Correct ? | 1 Yes | 0 No |
How to Test the mainframe application?(tell me few basic things)
Why we are selecting QTP for testing ?
How will internal and external links be validated and updated? how often?
how to post xml data from QTP scripts to any application?
What is the differences between image check point and bit map check point?
In QTP while testing 3 tier application, It is Java Based Application developed using Java, servelets and JDBC etc... and It is a Web based Application.. which Add-In do we need to select while testing ...Java or Web Add-In
Can we Run the Tests developed in QTP 8.2 in advanced versions like 9.0, 9.1, 9.2...etc.,
What are the main differences of qtp and win runner?
in qtp how i can retrive from a browser how many links are there.means total no of links used in a browser
What is test object model in QTP ?
What is difference between QTP 8.2 Obect Repository and QTP 9.2 object Repository?
Hello, I am facing problem to check textpoint for mercury application . I have inserted checkpoint to check flight summary for place of departure and arrival with datatable and script look like "Browser("Find a Flight: Mercury").Page("Book a Flight: Mercury").Check CheckPoint("Book a Flight: Mercury_4")" but while I am executing this script at last my check point gets fail and display Text Checkpoint: captured "" between Summary and 4/31/2008FLIGHT , expected "Acapulco" Match case: ON Exact match: OFF Ignore spaces: ON I think value from data table is not fatched so please guide me what I have to do to overcome this problem.. Thanks