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

What is the difference between Normal mode and Fast mode ?

1 Answers   AZTEC,


example-date format is 01-jan-09 in QTP.How to convert this format to 01-01-09?

9 Answers   Tech Mahindra,


1)Difference Between Value & RawValue?

2 Answers   Wipro, Zensar,


Need one Urgent help please,for ex: first time i created Local reposory and convert that local to shared Rep and save in some where(by using Export local objetcs), unfortunately that saved repository is missed, now i want same repository,but iam not able to export the same repository second time?? i need that Repository only how to get???

2 Answers   TCS,


WHAT IS ENVIRONMENT VARIABLES?

7 Answers   AZTEC, CTS, Ready Test Go,


How will u test content of an web application with out using chechpoints in QTP 9.2?

3 Answers   CTS,


What are the various types of Actions in UFT?

0 Answers  


What are the Disadvantages of shared object repository?

0 Answers  


what are the environment variables,how do you use them. give an example.

3 Answers   Polaris,


what is the script to select 2 or more than 2 options from a listbox.

2 Answers   Polaris,


when i am running login page i got test run error? Please give me the script to handle run time exceptions. It's urgent for me.

4 Answers  


WHAT AREV THE STEPS BETWEEN TEST cASE AND Script generation?

2 Answers  


Categories