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 will you convert a string to lower case string using vbscript?

643


What is vbscript language used for and which earlier language is it modeled upon?

626


Explain the scope of the variables using dim, public, and private keywords respectively.

805


what is used of Property........End Property loop ? how to write the script for it?

1780


Description.Create

2229






What is the extension of the vbscript file?

632


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

591


Explain the tristate constants in vbscript?

661


How can constants be declared in the vbscript language?

647


What's the difference between vbscript and vb.net?

627


A folder is there inside no of textfiles are avilable. How do count the textfiles. Normally folder means we are using subfolder methods but textfiles is not working for subfolder methods and how do get file name also.

1594


Explain few date functions in vbscript?

698


Can any one provide code for Mid(string,start[,length]). I have been asked to write code for Mid(). i.e We need to define our own function say MyMid() which should behave same like built-in Mid function

1997


How do i automate a website www.flyashx.com without having any test cases witin a week time.

1543


What are the 2 ways in which a variable can be declared in the vbscript language?

661