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 |
What is difference between Quality centre and Test Director?
Explain hybrid framework with advantages and disadvantages?
what is the difference between link and hyperlink?
In descriptive programming how we know the properties of the objects, if application is not developed and the prototype of the application is also not developed.
what is the difference between DP and keyword driven framework?
Can u call txt extension file in QTP?
Explain sub procedure of vbscript.
how i will connect oracle or microsoft acess database through manually written Script
4. How u will open the build automatically in QTP except using Systemutil.run command
I am just a beginner in QTP. Could any one explain me in detail how to automate adding two numbers and getting the result in QTP. Also I would like to parameterize the inputs. I have tried but getting an error like 'Can't use sub.....'(can't recollect the exact error)
what is the long form of QTP ?
Can u call winRunner scripts from QTP?