
Hi @Haseeb zaidi ,
Please note that this behavior is now by design that confirmation dialog (beforeunload event) won't show up when the browser is launched by WebDriver. WebDriver Classic protocol does not support this feature.
As a workaround, you can enable WebDriver BiDi and set unhandledPromptBehavior to "ignore". Based on my test, the confirmation dialog appears as expected.
If you have any feedback on this behavior, please leave a comment in the original Chromium issue post or create a new issue post there. Thanks for your understanding.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Best Regards,
Shijie Li