Recall & Review
beginner
What does retry-ability mean in Cypress commands?
Retry-ability means Cypress automatically repeats a command until it passes or times out. This helps tests wait for elements or conditions to be ready without manual waits.
Click to reveal answer
beginner
Which Cypress commands are retry-able by default?
Commands like
get(), contains(), should(), and find() are retry-able. Cypress keeps trying them until the element appears or the assertion passes.Click to reveal answer
beginner
Why is retry-ability helpful in testing dynamic web pages?
Because web pages can load elements slowly or change over time, retry-ability lets tests wait for the right state without failing immediately. It makes tests more stable and less flaky.
Click to reveal answer
intermediate
How long does Cypress retry a command before failing?
Cypress retries commands up to the default timeout of 4 seconds. You can change this timeout if needed. If the command still fails after this time, the test fails.
Click to reveal answer
intermediate
Can you disable retry-ability for a Cypress command?
No, retry-ability is built into Cypress commands and cannot be disabled. But you can control timeouts or use commands that do not retry, like
then().Click to reveal answer
What happens when a retry-able Cypress command fails initially?
✗ Incorrect
Cypress automatically retries retry-able commands until they pass or the timeout is reached.
Which of these Cypress commands is NOT retry-able?
✗ Incorrect
then() does not retry because it runs after commands resolve.How can you change how long Cypress retries a command?
✗ Incorrect
You can set a custom timeout to control how long Cypress retries commands before failing.
Why is retry-ability important for testing web pages?
✗ Incorrect
Retry-ability helps tests wait for elements or conditions to be ready, improving stability.
If a retry-able command never passes, what happens?
✗ Incorrect
If the command does not pass before the timeout, Cypress fails the test.
Explain retry-ability in Cypress and why it helps make tests more reliable.
Think about how Cypress handles commands that don't succeed immediately.
You got /4 concepts.
Describe how you can control the retry timeout in Cypress and when you might want to adjust it.
Consider scenarios with slow or fast loading elements.
You got /4 concepts.