作者:Gakki
解决方案
- 在 context -上下文中设置
browser.new_context(ignore_https_errors=True)
from playwright.sync_api import sync_playwright, expect
with sync_playwright() as p:
browser = p.chromium.launch(headless=False)
context = browser.new_context(ignore_https_errors=True)
page = context.new_page()
codegen 录制用例
- 录制用例时,启动命令添加
playwright codegen --ignore-https-errors https:www.baiducom