随笔分类 - selenium
多多学习
摘要:pip --upgrade批量更新过期的python库 https://blog.csdn.net/qq_35318838/article/details/76269692 今天看了下系统环境,不少python库都有了更新,再用旧版本库可能已经不适合了,就想把所有的库都更新到最新版本。查看系统里过期
阅读全文
摘要:对弹窗(alert)的处理 三种弹出框alert(一个按钮),confirm(两个确认,取消),prompt(两个按钮+输入框)。切换到弹框: switch_to_alert() 新版的selenium用: browser.switch_to.alert.accept()browser.switch
阅读全文
摘要:在页面操作过程中有时候点击某个链接会弹出新的窗口,这时就需要主机切换到新打开的窗口上进行操作。WebDriver提供了switch_to.window()方法,可以实现在不同的窗口之间切换。 以百度首页为例: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
阅读全文
摘要:selenium from selenium import webdriver get_12306 = webdriver.Firefox() get_12306.get('https://www.12306.cn/index/index.html') a_href = get_12306.find
阅读全文