question

raratan avatar image
raratan asked ericnute converted comment to answer

iTest tool to check the broken link

Hi

 

Is there any tool in iTest which can test the broken link ?

 

Being more specific, on a GUI page we have links. Clicking any of those links will take to some links under it and further if any of those sub links are clicked some more links will appear. It can be going till some depth.

 

To check the depth of these links are working or not, is there any tool which can test the depth and will check the broken link.

 

 

iTestGUI Testing(Web-Java Swing-etc)
1 comment
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

udaya avatar image udaya commented ·

Is it about hyperlinks available in each web page???

0 Likes 0 ·

1 Answer

·
PaulD avatar image
PaulD answered ericnute converted comment to answer

Assuming you are talking about a web page, there is nothing built into iTest to do this for you.  You would need to write a procedure that will load a page using a hyperlink specified as an argument.  If it fails to load the page it fails the test.  Otherwise it would find a list of all hyperlinks on that page.  For each of these, it will call the procedure itself again (recursively).  An extra argument to the procedure can be "depth" which is incremented by one in each call, and checked at the top of the procedure.

 

To find a list of hyperlinks on a page, you can use snapshot and then perform a query on it to find all of the hyperlinks and store them in a list.

1 comment
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

PreetS avatar image PreetS commented ·

Adding on to PaulD's comment, the XPATH query  to use( with the snapshot command) to get a list of all the links is very simple"

//A

 

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.