jeudi 25 novembre 2021

how to click on an element until it is appearing (Cypress)

I need to click on pop-ups until they appearing. But there is the issue because on the different tabs in the application I have to click in them different number of times.

In python i just used loop with if and else, whenever some particular locator appeared I clicked in it, and when it is not present anymore I used else pass.

There is any solution in Cypress how can I click in a pop-up 4,5 or 6 times with if/else and continue test suite performing when a pop-up is not present anymore?

Maybe something with if-return, else-expect?

Thanks!

Aucun commentaire:

Enregistrer un commentaire