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, 2019 in Selenium by Anjali
• 2,940 points
571 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, 2019 by Sona

Related Questions In Selenium

0 votes
2 answers
+1 vote
2 answers

Is it possible to scroll down in a webpage using selenium webdriver programmed on python?

I using next code for facebook for ...READ MORE

answered May 16, 2019 in Selenium by mslavikas@gmail.com
17,108 views
0 votes
1 answer
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,510 points
3,192 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,890 points
2,387 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,890 points
2,543 views
0 votes
1 answer

Verification points in Selenium

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

answered Feb 11, 2019 in Selenium by Fred
534 views
0 votes
1 answer

What are the types of Assertion in Selenium?

In selenium Assertion is nothing but a ...READ MORE

answered Feb 11, 2019 in Selenium by Fred
760 views