In a page i have N number of links at a time i would like
to open those links by using QTP?how to do that?

Answers were Sorted based on User's Feedback



In a page i have N number of links at a time i would like to open those links by using QTP?how to ..

Answer / hokrani

Set ObjLink=Description.Create
ObjLink("micclass").value="Link"

Set PageLink= Browser("..").Page("..").ChildObjects(ObjLink)

For i=1 to PageLink.count
PageLink(i).Click
Next

Is This Answer Correct ?    7 Yes 1 No

In a page i have N number of links at a time i would like to open those links by using QTP?how to ..

Answer / manish

You can get it by first create description object like :-
set deslink = description.create()
deslink("micclass").value = weblink

then you can use this variable to get number of link in the
page like.

set bro = browser(" ").page (" ")
set countlink=browser(" ").page("
").weblink(deslink).childobjects
for countlink = 0 to countlink-1
bro.weblink(deslink).click
next

Is This Answer Correct ?    3 Yes 3 No

Post New Answer

More QTP Interview Questions

WHAT IS THE FRAMEWORK & ARCHITECTURE OF YOUR PROJECT

3 Answers   Wipro,


How to remove the associated function library?

0 Answers  


Hi! Using Descriptive Programming How do we get Parent object for an object. Say, i want to get a parent object for a "Link" in a web page. thanks

3 Answers  


What is the Diff between Image check-point and Bit map Check point?

3 Answers   Crea,


In a webtable, lets say there are 10 records and 1 column. let say "image" is available for 1st,2nd and 3rd records and 4th onwards image is not available. How to recognise for that cell image is available or not?

2 Answers  


Thanks....But can u tell me how i use the QTP for GIS with one Example...

0 Answers  


How will you handle the situation when object is not captured during record?

12 Answers   AZTEC,


An action has both shared and local OR associated with it and both have the same object in them. In the test which one will be considered?

0 Answers  


A web Page has a webtable with four columns and four rows. The first column is of ID and has values of 100,100A,A100,100y Find out the number of rows whose ID starts with 100. Similarly the last column is 'number of links'. Each row in the last column has values like link1,link2,link3 etc Find out the number of links where id is 100

1 Answers   Virtusa,


Wat is the command used to add an object(properties) to an object repository?

2 Answers   Virtusa,


When a requirement is given to u to automate , What is ur basic approach ?

4 Answers  


When we parameterise some field ex. Textbox is there any way that we can generate a specefic number of random values (For alphabetical values if possible) instead of manually entering values in the data table

2 Answers  


Categories