I need to check links on page for 404 using Cucumber.js. So I am guessing out on two things.
- How to implement loop in scenario. Because user should click on links and return back to page multiple times
Feature: Check broken links
Scenario: User clicks on links on web page
Given User is on website
And he clicks on link
Then he shouldn't see 404
And user returns back to click to another link on page
- And second is how to implement in js file clicking on all links to check content and returning to main page after every check.