Closed psech closed 3 years ago
It looks very similar to https://github.com/cypress-io/cypress/issues/8084
/support/index.js
Cypress.on('uncaught:exception', (err, runnable) => { cy.log('Uncaught Exception', err); return false; });
Spec
cy.get(selectors.archive.archiveNameInput) .clear() .type(archiveName);
Somewhere around clear() we face an uncaught:exception
clear()
uncaught:exception
Args: TypeError: The following error originated from your application code, not from Cypress. > Cannot set property 'status' of undefined
In Cypress, we experience the following
cy.type() failed because it requires a DOM element. The subject received was: > null The previous command that ran was: > cy.log()
When I comment out the cy.log('Uncaught Exception', err); it works fine.
cy.log('Uncaught Exception', err);
The cy.log should not swallow the subject.
cy.log
Cypress: 6.20 Chrome: 87 macOS Big Sur: 11.1
Duplicate of https://github.com/cypress-io/cypress/issues/6316
Calling Cypress commands does not work outside of the context of a test - so does not work when called within a Cypress event listener.
It looks very similar to https://github.com/cypress-io/cypress/issues/8084
Current behaviour
/support/index.js
Spec
Somewhere around
clear()
we face anuncaught:exception
In Cypress, we experience the following
When I comment out the
cy.log('Uncaught Exception', err);
it works fine.Desired behaviour
The
cy.log
should not swallow the subject.Versions
Cypress: 6.20 Chrome: 87 macOS Big Sur: 11.1