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.

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

In qtp, how you can use xpath to identify objects?

608


Does QTP run in any environment?

607


What is a programmatic description?

592


What is parameter in qtp?

674


What is meant by a Check Point in UFT? Also, explain the applicable Check Points.

702






What is the expert view?

547


Could any one tell me "How can i recognize my cursor position using QTP 9.2" Give me a scripts for this

2057


How to use parameterization in qtp?

616


Output values? i want a practical example

1309


How you can replace string in qtp?

568


if our qtp vb Script may be Currepted then What we want do?

1479


Explain the views in the QTP GUI?

615


What is a checkpoint? How many check points are there in qtp?

522


How to capture a window in QTP?

1522


Suggest and Define a solution for an application whose objects are not recognized by UFT?

661