how to display all the links in one page using vb script in qtp.

Answer Posted / sowmya

We can use the page check point to display the number of
links in a web page

or

we can create the child object

set objlink=description.create()
objlink ("micclass").value='weblink'
set odesc=browser("browser").page("browser").childobject
(objlink)

numberoflinks=objlink.count

msg numberoflinks


i think it should work.....

Is This Answer Correct ?    7 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to create a function in vbscript?

833


1. How to handle object implementation change in DP for Ex: i have login page with username,pasword (editboxes),login,cancel(buttons). Here i written DP code for login page with the help properties. My questions: 1.If properites are changing dynamically i will do (i want code for that) 2.if objects are changed dynamcally i will do (i wnat code for that)

1842


Explain the asc function?

689


Mention what is select case statement?

733


what is the use of QCUtil? explain with one example?

6653


Explain the operator precedence in vb script?

841


Hi Friends, I have an issue like the describe below: I'm using QTP and I'm testing on SharePoint. As you knoe, SharePoint has a customize function for user, so that, If I add an object Web Table at the first time, that object was recognized by "index" and "html tag", after that, if someone change the display of web part, the "Index" of my object was changed as well and QTP unable to select that Web Table. Can you guide me how to identify or anyway to keep that Web Table object as unique object? Thanks a lot.

2766


What are the properties of regexp object?

795


wat is the com(common object model)object for mozilla firefox???????plz if any one know the exact answer....reply me......

1668


Which object is used to work with the database in the vbscript language and what statement is used to create this object?

720


Explain How do you create a recordset object in vbscript?

795


i wrote vbscripit code in notepad i got error i am in learning stage if u ps tell me what wrong in my code my error is "object required descriptive at line one run time error"and my code is "set usernameobj=Descriptive.Create() usernameobj( "name").value="Username" set passwordobj=Descriptive.Create() passwordobj("name").value="password" set signinobj=Descriptive.Create() signinobj("name").value="sigin" browser("gmail").page("gmail").WebEdit("usernameobj").set ("enter username") Browser("gmail").Page("gmail").WebEdit("passwordobj").Set secure.Crypt.Encrypt("enter password") browser("gmail").page("gmail").WebButton("siginobj").click

1625


Can u describe what kind of testing are for OTC derivates by banks.

1883


What is the use of the recordset object and which statement is used to create such an object?

756


What is the purpose of regexp object in vbscript?

767