If it is a javascript alert, then you can use the Alert class in Webdriver. Refer here. Otherwise you can use Sikuli to close the popup.
Close javascript popup Oracle forms
-
30-07-2022 - |
Question
I am working on a project using Sikuli and web-driver to automate testing of Oracle forms using Chrome as the browser.
It works well but at the end of each test when shutting down the browser i get prompted with the following:
Confirm Navigation Incorrect method of closing form. Any unsaved changes will be lost.... Are you sure you want to leave this page?
Is there a way to suppress this popup using chromium flags? Webdriver cannot by default handle the javascript popup.
Thanks
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow