https://cypress.io logo
HI I'm trying if I can use cypress to test our pro...
# e2e-testing
f
HI I'm trying if I can use cypress to test our project and faced the problem. I'm trying to log in like this:
Copy code
describe('Loggin in ', () => {
      it('login user', () => {
      cy.visit ('/');
      cy.wait(30000);
      Cypress.Commands.add('typeLogin', (user) => {
        // search element by attribute name and value
        cy.get('[name="login_name"]').type(user.name);
        cy.get('[name="login_password"]').type(user.password);
})
       cy.typeLogin({ name: '2222', password: '3333' })
       cy.get('[akid="FormLoginAD-login_save"]').click();
       cy.wait(15000);
    })
but browser (chrome) under cypress control gets 401 response like not authorized for some requests and 1 request doesn't get response at all. Of course if I'm doing the same without cypress all works as expected.