【playwright】学习--持续汇总
selenium | playwright |
---|---|
selenium 需要结合其他自动化框架,比如pytest之后才能支持web自动化测试 | playwright 不需要其他自动化框架 |
selenium库》webdriver》浏览器驱动 | playwright库》playwright driver》浏览器驱动 |
目录
- 安装playwright
- 通过pip安装
- 通过VScode安装
安装playwright
通过pip安装
通过pip安装playwright
pip install playwright
pip install playwright -i 镜像地址
安装好的playwright在你的python路径的Scripts目录下
安装浏览器
playwright有自己默认的浏览器,比如:chromium,firefox
下载所有浏览器
playwright install
下载指定的浏览器
playwright install chromium
通过VScode安装
通过VScode安装playwright,直接在扩展中搜playwright,然后选择有microsoft认证的进行安装