Overwriting cy.visit no longer waits for the previous page to be unloaded #24240
-
Hi, I'm not sure if this is a bug or if I'm doing something wrong but I am trying to overwrite cy.visit so that I can perform some commands each time a new page loads (I have a sticky toolbar that I need to hide).
The problem is the commands I run after calling visit() are running before it even leaves the current page, rather than running on the new page. I tried adding How do I wait for the previous page to be unloaded before carrying on? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
oh I think I have just solved this almost as soon as I posted the question wrapping the visit() command in |
Beta Was this translation helpful? Give feedback.
oh I think I have just solved this almost as soon as I posted the question
wrapping the visit() command in
cy.wrap(visit(url, options))
seems to have done the trick!