The alerts can be forced using the following Firefox profile settings:
This enables an alert shown when closing the browser with "open changes" on the page, which cannot be controlled by Selenium.
Related Bugzilla issue: https://bugzilla.mozilla.org/show_bug.cgi?id=1434872
Related github threads
By changing the value of the [dom.disable_beforeunload] preference you enter unsupported behavior. As such we cannot help as long as w3c/webdriver#1294 hasn't been fixed.
As talked about yesterday even we do not support enabling the beforeunload events right now, this is a newer regression in Firefox 69. As such it is not a dupe of issue #1563.
Currently, Coypu exposes only one API to interact with dialogs (using the Selenium .SwitchTo().Alert() API).
The following dialog types are supported & working fine:
The onbeforeunload event causes the following dialog to show:
This dialog is of the same “base type” as the others - thus can be interacted with.
However, in some cases this dialog is shown:
This type of dialog can’t be controlled via Selenium.