Skip to content

Cypress fails weirdly on runtime when trying to interact with a custom dropdown #29534

Discussion options

You must be logged in to vote

The error was this piece of code somewhere else in the code:

cy.on("uncaught:exception", (err, runnable) => {
  cy.task("log", err);
  return false;
});

and this in my cypress.config

module.exports = defineConfig({
	e2e: {
		on("task", {
			log(message) {
				console.log(message);
				return null;
			},
		});
     }
});

That was the culprit, the uncaught exceptions happened randomly on some inputs, that's why it was failing at random

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by KrappRamiro
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant