selenium学习
MicoJack Honey
学习,(ง •̀_•́)ง
展开
-
Selenium基本操作
文章目录源码了解 switch_to()selenium的基本操作源码 def current_window_handle(self): """ Returns the handle of the current window. :Usage: driver.current_window_handle ...原创 2020-02-24 16:10:17 · 235 阅读 · 0 评论 -
Selenium元素定位
Selenium元素定位定位方式在Python selenium中所对应的方法含义idfind_element_by_id()通过id定位namefind_element_by_name()通过name定位class namefind_element_by_class_name()通过类名进行定位tag namefind_element_by_...转载 2020-02-24 14:29:54 · 96 阅读 · 0 评论 -
关于Selenium的close()与quit()的区别
源码 def close(self): """ Closes the current window. :Usage: driver.close() """ self.execute(Command.CLOSE) def quit(self): """ ...原创 2020-02-24 13:54:56 · 570 阅读 · 0 评论 -
关于Selenium的截图问题
截图方法Broswer.get(url = 'https://www.baidu.com/')Broswer.get_screenshot_as_file('.\img\\001.png')#必须以png结尾Broswer.save_screenshot('.\img\\baidu.png')#必须以png结尾源码 def save_screenshot(self, filen...原创 2020-02-24 13:43:21 · 936 阅读 · 0 评论 -
webdriver.Chrome.set_network_conditions:Chrome网络仿真设置。
参数print(webdriver.Chrome.set_network_conditions.__doc__)"""Sets Chrome network emulation settings. :Args: - network_conditions: A dict with conditions specification. :Usa...原创 2020-02-24 12:37:36 · 2375 阅读 · 0 评论 -
webdriver.Chrome参数解释
通过源码看解释最直接最不讲道理的方式就是看源码,使用之前一定要学会看说明书。打算使用jupyter演示的,但是jupyter不支持看源码,所以使用Pycharm吧。from selenium import webdriverBroswer = webdriver.Chrome(executable_path="chromedriver", port=0, ...原创 2020-02-24 12:08:34 · 20629 阅读 · 1 评论