Version
1.54
Steps to reproduce
When attaching Playwright to a PyQt5 QWebEngineView (QtWebEngine) via CDP, the initial Browser.setDownloadBehavior RPC always errors out because QtWebEngine’s DevTools server doesn’t implement it. As a result chromium.connect_over_cdp(wsUrl) immediately aborts with:
Protocol error (Browser.setDownloadBehavior): Browser context management is not supported.
Steps to reproduce:
-
Launch a PyQt5 app with QTWEBENGINE_REMOTE_DEBUGGING=9222 and load one or more pages in QWebEngineView.
-
From Python, call:
browser = await playwright.chromium.connect_over_cdp("ws://127.0.0.1:9222/devtools/page/<id>")
- Observe the above error and no attached Page objects.
Expected behavior
Playwright should skip unsupported CDP methods (like Browser.setDownloadBehavior) on attach when the server doesn’t support them, or expose an option to disable download/context management on connect.
Actual behavior
When calling await playwright.chromium.connect_over_cdp(wsUrl), Playwright immediately sends a Browser.setDownloadBehavior CDP command, which QtWebEngine rejects. The attach call then fails with:
Protocol error (Browser.setDownloadBehavior): Browser context management is not supported.
No Page objects are returned and all subsequent automation is aborted.
Additional context
Environment
▶ Playwright version: Version 1.54.0
▶ Python version: Python 3.10.18
▶ PyQt5 version: Version: 5.15.11
▶ Qt version: QMake version 3.1
▶ OS release: Ubuntu 24.04.2 LTS
Version
1.54
Steps to reproduce
When attaching Playwright to a PyQt5 QWebEngineView (QtWebEngine) via CDP, the initial Browser.setDownloadBehavior RPC always errors out because
QtWebEngine’s DevTools server doesn’t implement it. As a resultchromium.connect_over_cdp(wsUrl)immediately aborts with:Protocol error (Browser.setDownloadBehavior): Browser context management is not supported.Steps to reproduce:
Launch a PyQt5 app with
QTWEBENGINE_REMOTE_DEBUGGING=9222and load one or more pages inQWebEngineView.From Python, call:
browser = await playwright.chromium.connect_over_cdp("ws://127.0.0.1:9222/devtools/page/<id>")Expected behavior
Playwright should skip unsupported CDP methods (like Browser.setDownloadBehavior) on attach when the server doesn’t support them, or expose an option to disable download/context management on connect.
Actual behavior
When calling
await playwright.chromium.connect_over_cdp(wsUrl), Playwright immediately sends aBrowser.setDownloadBehaviorCDP command, whichQtWebEnginerejects. The attach call then fails with:Protocol error (Browser.setDownloadBehavior): Browser context management is not supported.No
Pageobjects are returned and all subsequent automation is aborted.Additional context
Environment