When adding the onbeforeunload event to a page, inside of which there is e.preventDefault() and e.returnResult with an empty string, Hammerhead overrides the prevented property, causing the native dialog not to be recorded in the TestCafe session storage.
When adding the
onbeforeunload
event to a page, inside of which there ise.preventDefault()
ande.returnResult
with an empty string, Hammerhead overrides the prevented property, causing the native dialog not to be recorded in the TestCafe session storage.