I need to ignore the alert raised by Chrome Webdriver: Alert Screenshot
I am trying using: browser.switch_to.alert.accept
but it is not working.
I already set up the option as:
chrome_options = Options()
chrome_options.add_argument("--disable-notifications")
But I believe the alert is not a notification object.
Thank you for your help!
To dismiss a popup, the method switch_to. alert(). dismiss() is used. To obtain the text on a popup, we have to use the switch_to.
Have you tried this.
chrome_options = Options()
chrome_options.add_argument("--disable-popup-blocking")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With