write script for finding number of broken links in web page?
kindly please answer my question.
Answers were Sorted based on User's Feedback
Thank u Lakshmi for responding my question.
But i asked about broken links,
u r script is for total links.
i want script for only broken links.
Is This Answer Correct ? | 3 Yes | 1 No |
Answer / pramila
Using Automatic Page checkpoint:
Go to Tools > Options > Web > Advanced and check the two
boxes labeled “Create a checkpoint for each page while
recording” and “Broken Links”.
Now every time you record a new page, QTP will automatically
include a checkpoint for broken links.
OR
By manually creating a Page checkpoint:
QTP does not provide a direct menu option to incorporate a
page checkpoint. You need to take the help of standard
checkpoint. Start recording session > Insert > Checkpoint >
Standard Checkpoint (OR press F12). Place and click the hand
pointer anywhere on your web page from "Object selection-
CheckPoints Properties" window click OK it takes you to
"Page checkpoints Properties" where in click on 'Broken
Links" option.
Run the above script. Go To Test Results > Your Check Point.
Check the status of all links under “Broken Links Result”
If you want to verify links pointing only to the current
host check the box titled “Broken Links- check only links to
current host” under Tools > Options > Web. Similarly If you
want to verify links pointing to other hosts as well,
uncheck it.
Is This Answer Correct ? | 0 Yes | 2 No |
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 |
hen do start automation testing after manual testing
Hi, Can anyone please tell me how to connect the QC with QTP using QTP script? Thanks in advance
What are the features and benefits of quick test pro (qtp 8.0)?
in a database table there are 3 columns (name , marks,grade) , in application after retrieving data from db to fields name, marks click ok button then grade should displayed ---for this how to write vb script prgm
Please explain the role of Regular expression in QTP
Explain the check points in QTP?
Can anyone pls tell me how to do action parameterization (input and output parameters) with respect to login window and insert order of flight reservation window in detail( pls give a clear step by step explanation with example) anyone please. Will be very thankful to u
What is reusable action?
What frame work ur using in QTP in ur current company?
In QTP I have a parameter in a datatable that is a sentence. I need to take the last word from the sentence and enter it into a field in a web application. How can I setup a parameter to enter in just a portion of the parameter (last word of the sentence) instead of the entire paramater (whole sentence).
what is Action conversion tool? what the Action conversion tool will do?
What are some test assets and related extensions of qtp?