Python with selenium: invalid(?) warning -
using python selenium, fragment of code:
alert = driver.switch_to_alert().accept()
by run code, get:
warning (from warnings module): file "c:\python34\selenium\webdriver\remote\webdriver.py", line 517 warnings.warn("use driver.switch_to.alert instead", deprecationwarning) deprecationwarning: use driver.switch_to.alert instead
i dont understand this, didn't use driver.switch_to.alert?
take closer @ name of call - once it's written underline, once dot inbetween. using method switch_to_alert()
of driver
object - seems selenium has deprecated method in favor of seperated switch_to
subclass / property.
so should use method alert()
of switch_to
of driver
, using switch_to_alert()
of driver
.
Comments
Post a Comment