Reputation: 69
How can I tell selenium to press cancel in this case or remove the whole box completely. I looked around and only really saw C# answers. Thank you for your time :)
Upvotes: 0
Views: 442
Reputation: 29362
At first glance, it seems like that's an Alert.
In Python-Selenium
you could do this:
Alert = driver.switch_to.alert
Alert.dismiss()
However, It could be a pop-up in HTMLDOM as well. In this case, you will have to find the right locator (CSS, XPath etc.)
and perform a click on that cancel button.
Upvotes: 1