'cypress ignore timeout when using timeout
cy.get('#btnPulisciFiltri', { timeout: 15000 }).should('be.visible').click()
use 15sec but cypress ignore this always have
CypressError Timed out retrying after 4050ms: cy.click() failed because this element:
...
Solution 1:[1]
It's referring to the .click() which has it's own timeout option
cy.get('#btnPulisciFiltri', { timeout: 15000 })
.should('be.visible')
.click({ timeout: 15000 })
What is the full error message?
Solution 2:[2]
Fody's answer is perfect for applying the timeout to only one command. If you wanted to apply the timeout globally, you can set the timeout value in your cypress.json.
{
"defaultCommandTimeout": 15000
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Fody |
| Solution 2 | agoff |
