https://cypress.io logo
session() into blank page
# i-need-help
d
Hey there, Got an issue trying to transit from classic login to session's type. After my session is created, i got a blank page on all my tests. Prior the switch, it was all working. Am i missing something? Cypress.Commands.add("login", () => { const username = "xxx" const pwd = "xxx" cy.session([username, pwd], () => { cy.visit(routes.URL_BASE + "/login"); const loginForm = utils.getCypressComponentByDataId(components.LOGIN_FORM); const usernameInput = utils.getCypressComponentByDataId( components.LOGIN_FORM_USERNAME_INPUT ); const passwordInput = utils.getCypressComponentByDataId( components.LOGIN_FORM_PASSWORD_INPUT ); const submitButton = utils.getCypressComponentByDataId( components.LOGIN_FORM_BUTTON_SUBMIT ); usernameInput.type(username) passwordInput.type(pwd) submitButton.click() })