Write a QTP script to print all the link names displayed in
a web page

Answers were Sorted based on User's Feedback



Write a QTP script to print all the link names displayed in a web page..

Answer / xyz

set linkObj=description.create
linkObj("micclass")="link"

set linkChildObj=B().p().childobjects(linkObj)
childCount=linkChildObj.count

for i=0 to childCount-1
linkName=linkChildObj(i).getROProperty("innertext")
msgbox linkName
next

Is This Answer Correct ?    52 Yes 10 No

Write a QTP script to print all the link names displayed in a web page..

Answer / siba

set linkObj=description.create()
linkObj("micclass").value="link"

set linkChildObj=Browser("Google Accounts").page("Google
Accounts").childobjects(linkObj)
childCount=linkChildObj.count
msgbox(childCount)
for i=0 to childCount-1
linkName=linkChildObj(i).getROProperty("innertext")
print( linkName)
next

Is This Answer Correct ?    16 Yes 2 No

Write a QTP script to print all the link names displayed in a web page..

Answer / mani

go to any web page click on any link..store it in OR
manager...Then according to the browser name and page name
write the script
Example:


Browser("name").Page("name").weblink
("destination").GetROproperty("number of links")

Is This Answer Correct ?    11 Yes 16 No

Write a QTP script to print all the link names displayed in a web page..

Answer / bidyut prava

Browser("name").Page("name").Link("destination").Click

Is This Answer Correct ?    4 Yes 11 No

Post New Answer

More QTP Interview Questions

How to handle Java tree in QTP?

0 Answers  


RECENTLY I PLACED IN QTP..HOW TO IMPROVE VB SCRIPTS KNOWLEDGE? IAM STRUGGING TO WRITE THE AUTOMATION SCRIPTS? ANY BODY TELL HOW TO IMPROVE QTP SCRIPT SKILLS?

0 Answers  


Tell me few important difference Between QTP and WinRunner?

9 Answers   TCS,


How to get popup error message.

0 Answers   Tech Mahindra,


How to start recording using quicktest professional (qtp)?

0 Answers  


How can you capture(Read) the values from a Table?

1 Answers  


After creating testcases, how do you start testing in QTP? what methodology will follow?

7 Answers   Actran, American Well,


Can I use datatable of Action1 in the Action2.

2 Answers   IBM,


What are private functions in QTP? How they can be called from the function library?

0 Answers   HCL,


how to insert QTP to display errors and other description in the test results instead of halting execution by throwing error in the mid of executin due to an error (for object not found)?

1 Answers   Ordain Solutions,


1>why parameterization is necessary in qtp? 2>if we give constant value then what problem?

5 Answers   Wipro,


how your doing reporting in your script?

1 Answers   IBM,


Categories