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 ?    51 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

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

2 Answers   Nokia,


Differences between QTP & Winrunner?

2 Answers   Crea,


Suppose there is a bitmap with some text in it how do you write the script to get the text.

2 Answers   BirlaSoft,


Hi,i have 3 years of experience in manual and Automation qtp.present i am searching for job in automation qtp 2Yrs,How to Explain the interviwer Roles and Responsibilites.please help me.

1 Answers  


How to work with multiple browsers when opened in the window, write the script for it

2 Answers   Verizon,






What phases are involved in testing an application in qtp?

0 Answers  


We have a dynamic webtable where rows keep on adding.I have to click on particular row where the status changes to Update or Save.How do you click on Status(either it can be Update or save)

2 Answers   IBM, Infosys,


What is the difference Between LowLevel and Normal Recording Modes?

1 Answers  


What is the meaning Work bench?

0 Answers  


How to recognize and read data from pdf file using Descriptive Programming in QTP?

1 Answers   Satyam,


Can we record an application running on a remote machine using qtp?

0 Answers  


what is meant by function library?Public and private functions in function library? if private functions are applicable for only for the particular test means then y we have to add those to function library?

0 Answers  


Categories