playwright 安装
python 文档
https://playwright.dev/python/docs/intro
官方文档中提示以下安装,再python3 安装时会报错,python3 使用如下进下安装:
1、Install the Pytest plugin:
pip3 install pytest-playwright
2、Install the required browsers:
python3 -m playwright install
Installing collected packages: text-unidecode, python-slugify, pyee, playwright, pytest-base-url, pytest-playwright
WARNING: The script slugify is installed in '/Users/don.guo/Library/Python/3.10/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
WARNING: The script playwright is installed in '/Users/don.guo/Library/Python/3.10/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
playwright
zsh: command not found: playwright
解决办法1:
python3 -m playwright codegen playwright.dev
解决办法2:
https://www.cnblogs.com/tarzen213/p/16850988.html
我们打开~/.bash_profile
source ~/.bash_profile