Why switching to alert through selenium is not stable?
For example. 1. Run a code and all good. Everything worked out well. But if this code is run in a few min
This will click the OK button on the alert:
driver.switch_to.alert.accept()
This will click the CANCEL button on the alert:
driver.switch_to.alert.dismiss()