jeudi 25 juin 2020

Cypress: How to Login during beforeEach

beforeEach('Login', function() 
{
cy.visit('/')
    
const userCred = new Map(users);    
for (const [key, value] of userCred.entries()) 
{
    
        cy.login(key,value)
    })
}
})

I get following error Message [1]: https://i.stack.imgur.com/f0xKU.png [![error message][1]][1]

The Login Command works when I use it in the describe ('login', ()=> { it('login', ()=>{ cy.login(key, value) })})

How can I get the login work in the beforeEach?

Aucun commentaire:

Enregistrer un commentaire