Great tutorial!
I have one issue that's been bugging me for ages. That is, running the same test on multiple pages.
For example, if I want to check that 2 different pages have a banner element on them:
On home-page.feature
home-page.feature
Feature: Home Page Scenario: Check the home page Given I am on the home page Then there should be a banner // other test
and on about-page.feature
about-page.feature
Feature: About Page Scenario: Check the about page Given I am on the about page Then there should be a banner // other test
and then on each matching steps.js I have:
steps.js
Then('there should be a banner', async function() {....
Which fails with the error: Multiple step definitions match
Multiple step definitions match
Do you know of a way I can run the same test on multiple pages?
Many thanks!
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Great tutorial!
I have one issue that's been bugging me for ages. That is, running the same test on multiple pages.
For example, if I want to check that 2 different pages have a banner element on them:
On
home-page.featureand on
about-page.featureand then on each matching
steps.jsI have:Which fails with the error:
Multiple step definitions matchDo you know of a way I can run the same test on multiple pages?
Many thanks!