摘要: 设置元素等待 为什么需要设置元素等待? 因为,目前大多数Web应用程序都是使用Ajax和Javascript开发的;每次加载一个网页,就会加载各种HTML标签、JS文件 但是,加载肯定有加载顺序,大型网站很难说一秒内就把所有东西加载出来,不仅如此,加载速度也受网络波动影响 因此,当我们要在网页中做元 阅读全文
posted @ 2020-12-18 20:59 晟森正茂时 阅读(254) 评论(0) 推荐(0) 编辑
摘要: 导入selenium中的webdirver包 from selenium import webdriver 1、id定位 driver.find_element_by_id("username").send_keys("admin") 2、name定位 driver.find_element_by_ 阅读全文
posted @ 2020-12-18 20:06 晟森正茂时 阅读(162) 评论(0) 推荐(0) 编辑
摘要: 1、下载谷歌驱动:chromedriver.exe http://chromedriver.storage.googleapis.com/index.html (下载驱动的链接) 2、把下载的chromedriver.exe 放到 C:\Programs\Python\Python36 这个下面 ( 阅读全文
posted @ 2020-12-18 11:54 晟森正茂时 阅读(326) 评论(0) 推荐(0) 编辑