Answer the question
In order to leave comments, you need to log in
How to do the same test for an array of pages in cypress?
Tried to do so, but gives an error ->Cannot call `cy.visit()` outside a running test.
describe('example to-do app', () => {
pages.forEach(page => {
cy.visit(page)
it(`TEST for page ${page}`, () => {
cy.get('.home-section').should('have.length', 4)
})
})
})
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question