莫愁前路无知己,天下谁人不识君。。。。

Python+selenium 判断弹窗补充

上一篇 / 下一篇  2018-03-30 14:28:19 / 个人分类:python知识精髓

from selenium.webdriver.support import expected_conditions as EC
result = EC.alert_is_present()(driver)
if result:
    print result.text
    result.accept()
else:
    print "alert 未弹出!"

TAG: 弹窗

 

评分:0

我来说两句

Open Toolbar