Find broken link in a webpage using selenium

0 votes
Is there a way to find broken links in selenium? Can someone explain me as how it is done?
Jan 8 in Selenium by Anjali
• 2,900 points
58 views

1 answer to this question.

0 votes

You have to follow these steps to find broken images in a page using Selenium Web driver:

  • get XPath and get the all links on the page using the tag name
  • click on  every link on the page
  • look for 404/500 in the target page title
This way you can either check for the broken links or store them in a file and use it for later references.
Hope this helps.
answered Jan 8 by Sona

Related Questions In Selenium

0 votes
1 answer
0 votes
2 answers
0 votes
1 answer
0 votes
5 answers
0 votes
1 answer

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,050 points
256 views
0 votes
1 answer
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,130 points
622 views
0 votes
1 answer

How to use such xpath to find web elements

It's much simpler to use: #MyDiv123 > div.super or ...READ MORE

answered Jun 14, 2018 in Selenium by Samarpit
• 5,130 points
249 views
0 votes
1 answer

Verification points in Selenium

There are basically three verification points that ...READ MORE

answered Feb 11 in Selenium by Fred
95 views
0 votes
1 answer