How to use the beforeunload event? #2699
windyliu1118
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Currently, I encountered some scenario about when going to the main url of the product, there will be one prompt window pops up.

![Uploading Screenshot 2023-04-12 at 18.15.12.png…]()
So I use the
beforeunload(async () => await accept());in the beforeSuite hook to handle the unexpected modal, but it's not working well.How should we use the beforeunload event in the code?
I add the
Beta Was this translation helpful? Give feedback.
All reactions