![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
selenium
web端UI自动化
Jojo su
冲冲冲,要努力鸭
展开
-
selenium4.0的一些基本用法
1、初始化浏览器、刷新、最大化、后退、前进、截图2、单个元素定位的方法selenium4使用的时候需要导入模块 from selenium.webdriver.common.by import Byfind_element(By.XPATH, "//*[@id='search']")find_element(By.CLASS_NAME, "element_class_name")find_element(By.ID,"element_id")find_element(By.NAME, "elem原创 2022-07-04 16:20:40 · 7866 阅读 · 3 评论 -
mac安装selenium
1、命令行输入pip install selenium2、下载浏览器对应的chromedriver版本,http://chromedriver.storage.googleapis.com/index.html3、下载的文件默认在Downloads下,解压之后把它移动到/usr/local/bincd Downloadsmv chromedriver /usr/local/bin4、chromedriver -v查看是否安装成功如果出现无法验证开发者,输入以下命令:xattr -d com.apple.qu原创 2022-07-01 15:19:53 · 1083 阅读 · 0 评论