playwright常用命令

发布时间 2023-06-28 09:32:52作者: 测试中的流浪狗

# 安装pip3
sudo apt install python3-pip
# 安装pytest插件
pip3 install pytest-playwright
pip3 install playwright
# 安装chromium firefox webkit等浏览器的驱动文件(内置浏览器)
python3 -m playwright install

若出现:BEWARE: your OS is not officially supported by Playwright; downloading fallback build.

rm -rf ~/.cache/ms-playwright/
# 录制
python3 -m playwright codegen 空白地址
python3 -m playwright codegen playwright.dev(制定域名)