If you want to OK the following
from selenium import webdriver
from selenium.webdriver.common.alert import Alert
driver = webdriver.Chrome("driverPath")
#Press the OK button
Alert(driver).accept()
#Press the cancel button
Alert(driver).dismiss()
IDE
Python
python-3.9.1
OS
Recommended Posts