selenium中没有switch_to_alert()函数
问题描述:
今天写的一个自动化测试脚本的题,要求是要用switch_to_alert(),但是当我CTRL+左键之后却提示我没有switch_to_alert(),我去网上查了好多就是这样写的,但是我的却没有。不知道为什么。
答
自己找了了解决的办法
time.sleep(1)
a=driver.switch_to.alert.accept()