随笔分类 - playwright
摘要:## 不用pytest-playwright提供的page pytest使用的时候特别简单直接在用例中添加一个page fixture就可以使用了,如果我们想自己直接调用playwrght怎么办?官网:https://playwright.dev/python/docs/library#usage
阅读全文
摘要:pytest+playwright做UI自动化是我最近一直使用的‘套餐’。本文重点playwright,需要对pytest有较深的了解 ## 官网 想系统学习还是要去官网文档:https://playwright.dev/python/docs/intro ## 安装pytest插件:pytest-
阅读全文
摘要:背景 今天有同学反馈上传playwright上传文件失败了,使用selenium也不行。 解决办法 with page.expect_file_chooser() as fc_info: page.get_by_text("Upload").click() file_chooser = fc_inf
阅读全文
playwright安装提示:BEWARE: your OS is not officially supported by Playwright; downloading fallback build
摘要:背景 在我们执行playwright install的时候会提示: your OS is not officially supported by Playwright; downloading fallback build 解决办法 这个不需要解决哈,忽略提示信息。如果是连续打印了很多行提示信息,我
阅读全文
摘要:背景 看官文中的代码生成器: playwright codegen playwright.dev 解决方法-1 打开终端执行: python3 -m playwright codegen playwright.dev 解决方法-2 在安装playwright的时候会提示: 我们打开~/.bash_p
阅读全文
摘要:背景 请求了https请求,会提示: Bypassing ERR_CERT_AUTHORITY_INVALID error 这个 AUTHORITY_INVALID怎么这么眼熟 解决办法 创建conftest.py: @pytest.fixture(scope="session") def brow
阅读全文
摘要:背景 今天运行playwright官网的实例,尽然报错了。上周相同的用例还是可以执行的啊 提示信息如下: Navigation failed because page crashed! 解决办法 关闭全部谷歌浏览器,然后在运行用例就可以正常运行。 参考 https://stackoverflow.c
阅读全文
摘要:解决办法 Install the Pytest plugin: pip3 install pytest-playwright Install the required browsers: python3 -m playwright install
阅读全文
摘要:背景 想知道如何在 Playwright 和 Selenium 之间进行选择以实现测试自动化?继续阅读以查看两种流行的测试自动化工具之间的比较。 在 Web 测试自动化方面,Selenium 多年来一直是行业的主导工具。但是,市场上还有许多其他自动化测试工具。Playwright 是一种较新的工具,
阅读全文