question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Feature] Allow connecting to CEF instances via `browserType.connectOverCDP`

See original GitHub issue

Context:

  • Playwright Version: [Version 1.17.1]
  • Operating System: [Windows]
  • Node.js version: [v12.16.1]
  • Browser: [ CEF | 90.6.3+gc53c523+chromium-90.0.4430.93]
  • Extra:
  • CEF | 90.6.3+gc53c523+chromium-90.0.4430.93 Chromium | 90.0.4430.93 OS | Windows WebKit | 537.36 (@4df112c29cfe9a2c69b14195c0275faed4e997a7) JavaScript | 9.0.257.23 User Agent | Mozilla/5.0 (Windows NT 6.2; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93; ) Safari/537.36

Code Snippet import { test, expect ,chromium } from ‘@playwright/test’; test(‘my test’, async () => { const cdpBrowser1 = await chromium.connectOverCDP({ wsEndpoint: ws://localhost:9222/devtools/browser/01582b7e-7cb0-4bed-a8b1-5e211d3a3ab6, }); });

Describe the bug

I have an application that uses the chromium version 90 from CEF as a browser . when I run the above snippet it throws the following exception: browserType.connectOverCDP: Protocol error (Browser.setDownloadBehavior): Browser context management is not supported. =========================== logs =========================== <ws connecting> ws://localhost:9222/devtools/browser/01582b7e-7cb0-4bed-a8b1-5e211d3a3ab6 <ws connected> ws://localhost:9222/devtools/browser/01582b7e-7cb0-4bed-a8b1-5e211d3a3ab6 ============================================================

6 | const cdpBrowser1 = await chromium.connectOverCDP({ ^ 7 | wsEndpoint: ws://localhost:9222/devtools/browser/01582b7e-7cb0-4bed-a8b1-5e211d3a3ab6, 8 | }); 9 | console.log('connected ');

    at D:\projects\playwright\tests\demo.spec.ts:6:39
    at FixtureRunner.resolveParametersAndRunHookOrTest (D:\projects\\playwright\node_modules\@playwright\test\lib\fixtures.js:306:12)
    at WorkerRunner._runTestWithBeforeHooks (D:\projects\playwright\node_modules\@playwright\test\lib\workerRunner.js:499:7)

same snippet works fine for the chromium browser 90 when it launched via: “C:\Users\rakshetri\AppData\Local\Google\Chrome\Application\chrome.exe” --remote-debugging-port=9333 – “%1”

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:32
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

4reactions
shals-praisecommented, Jan 11, 2022

@mxschmitt I am evaluating playwright for our automation requirements and so far it seems to be a great e2e testing framework!!..We also need this feature to connect to CEF. Most of the latest testing frameworks do support Chromium Embedded Framework… Waiting to have it supported by playwright soon.!!

4reactions
rajukshetricommented, Dec 17, 2021

@mxschmitt thank you very much I will be highly appreciate your efforts towards this . I am eagerly waiting for this support as this is road blocking for our CEF e2e testing with PW.

Read more comments on GitHub >

github_iconTop Results From Across the Web

chromiumembedded / cef / wiki / GeneralUsage - Bitbucket
CEF can be remotely debugged from any CEF or Chrome browser window. Also configurable using the "remote-debugging-port" command-line switch.
Read more >
Use connectOverCDP in Playwright Internal With Examples
Learn how to use connectOverCDP function in Playwright Internal framework for your next JavaScript automation project with LambdaTest Automation Testing ...
Read more >
CefSettings Class - CefSharp
Initializes a new instance of the CefSettings class ... DoMessageLoopWork() function in cases where the CEF message loop must be integrated into an...
Read more >
BrowserType | Playwright - CukeTest
This methods attaches Playwright to an existing browser instance using the Chrome DevTools Protocol. The default browser context is accessible via browser.
Read more >
BrowserType (Playwright - Main Library 1.15.1 API) - javadoc.io
BrowserType provides methods to launch a specific browser instance or connect to an existing one. The following is a typical example of using...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found