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



There are some links on the web page,write a script to count and click those links and check the t..

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

There are some links on the web page,write a script to count and click those links and check the t..

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

There are some links on the web page,write a script to count and click those links and check the t..

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

Post New Answer

More QTP Interview Questions

How to Test the mainframe application?(tell me few basic things)

3 Answers  


Why we are selecting QTP for testing ?

20 Answers   HP,


How will internal and external links be validated and updated? how often?

0 Answers  


how to post xml data from QTP scripts to any application?

0 Answers  


What is the differences between image check point and bit map check point?

0 Answers  






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

6 Answers  


Can we Run the Tests developed in QTP 8.2 in advanced versions like 9.0, 9.1, 9.2...etc.,

3 Answers   ADP,


What are the main differences of qtp and win runner?

0 Answers  


in qtp how i can retrive from a browser how many links are there.means total no of links used in a browser

4 Answers   Verizon,


What is test object model in QTP ?

8 Answers  


What is difference between QTP 8.2 Obect Repository and QTP 9.2 object Repository?

2 Answers   Nokia,


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

0 Answers  


Categories