Navigate to another page to fire the onBeforeUnload event. Click the Navigate link without having changed a form element. Then retry after changing or entering text in any form element.