Reputation: 1203
i have a page which loads after 6secs before buttons appeared.
I want the script does not fail, wait for the button then perform clicks.
the cypress documentation stated "wait for an aliased resource" ,
i am not sure what is this and how to integrate to current script:
cy.contains('Button A').click()
Upvotes: 1
Views: 563
Reputation: 18634
You can add a timeout for 6 seconds and more.
cy.contains('Button A',{ timeout: 6000 }).should('be.visible').click()
Upvotes: 1