write script for finding number of broken links in web page?
kindly please answer my question.
Answer Posted / lakshmi
To find no:of links present in any open web page:-
************************************************
dim br,pg,objbr,objpg,linkcoll,lcount
br=Browser("micclass:=Browser").GetRoProperty("name")
pg=Browser("micclass:=Browser").Page("micclass:=Page").
GetRoProperty("title")
set objbr=description.create
set objpg=description.create
set odesc=description.create
odesc("micclass").value="Link"
objbr("name").value=br
objpg("title").value=pg
set linkcoll=Browser(objbr).Page(objpg).ChildObjects(odesc)
lcount=linkcoll.count
msgbox lcount
Try it...
| Is This Answer Correct ? | 3 Yes | 7 No |
Post New Answer View All Answers
I want to configure the OR and library files to a particular QTP test during run time. Note: OR and Library files are located in Quality Center. Is it possible in QTP? Anybody having code?
What is RTM (require ment tracebulity marix) fromate?
How to find the difference between 2 dates in qtp?
How to use reporter.report event in qtp ?
How do you send email with attachment from outlook using qtp ?
To which environments does quicktest professional supports?
How can you send user defined messages to test report?
what the difference between shared repository and per action repository?
What is qtp window?
There is an excel file of 1 to 100 sheets how you will iterate through it?
There are 10 rows in the datatable. How can we fetch 2 rows and then skip 3rd row. After that, pick 4th & 5th row and skip 6th row. Please share code
how to use the regular expression for the below code-- swf("application name").swftreeview ("Treename").select"Medication;Pharmacy:56" There is a tree view window of the folder's ie Medication- >Pharmacy(sub folder)with 56 as count of records...The records can be different or if no records present in the specific folder..then it show "Paharmacy:-no records".Whe i record at the first time .....and try to rerun the same script with different records count say "pharmacy:800"..qtp is not regnizing it...therefore i want to user regular expression..but donot now how to use it and where to use...i have tried.... swf("application name").swftreeview ("Treename").select"Medication;Pharmacy:\*"..but it s of no use..plz help..me
What are the views available in quicktest professional?
How to handle dynamic objects in quicktest professional (qtp)?
What are the types of object repository in qtp?