admin管理员组文章数量:1535092
最近需要用到它,但是吧老是忘记怎么运行的;记录一下免得我自己忘记:
python 安装 playwrigt
pip install playwright
安装Chromium、Firefox、WebKit等浏览器的驱动文件(内置浏览器)
python -m playwright install
开启playwrigt工作
python -m playwright codegen 页面地址,从这里开始录制;
python -m playwright codegen --target python -o ‘my.py’ -b chromium 页面地址
target:规定生成脚本的语言,有JS和Python两种,默认为Python
b:指定浏览器驱动
o:将录制的脚本保存到一个文件
使用 Chromium驱动,打开地址页面,将结果保存为my.py的python文件
python -m playwright codegen --help 查看帮助
本文标签: playwright
版权声明:本文标题:playwright使用 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://m.elefans.com/xitong/1726895526a1089088.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论