DEV Community

Discussion on: Sure you want to leave?—browser beforeunload event

Collapse
 
pinguinosod profile image
David Cautin

Everything works fine, except when I try to create UI tests, seems like firefox doesn't trigger beforeunload when it is being controlled by an automated software.

Collapse
 
samthor profile image
Sam Thorogood

Unfortunately, since the browser is entirely allowed to decide whether to show this message at all (e.g. if a tab has never had focus), it might not be something you can really test in an automated fashion. 😔