Using Ruby Selenium WebDriver how to check URL or Navigation which return 404?



  • What is the most convenient way of using Ruby script for Selenium WebDriver to check all url's (from navigation menu)of any web page.Actually want to run them to see where they go. For example: Take - www.google.com and see if it goes to www.google.com (no error/redircts) or if i click to contact from the navigation menu then is it redirecting to the write page(google.com/contact) or throws a error such as 404, & 500.



  • You could use next algorithm Get all links from page. Implement ruby script to check all links First steps are implemented in two ways Open page by webdriver, and get all links by tag , for example Get page by http request and parse html code by regex Second step: Implement script for request sending Use this link for implemention script. Good luck!



Suggested Topics

  • 2
  • 2
  • 3
  • 2
  • 2