-
Notifications
You must be signed in to change notification settings - Fork 448
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement CefDevToolsManagerDelegate::GetDefaultBrowserContext for CDP cookie management #3684
Comments
Given that this API should already work with the CEF Chrome bootstrap (same code as Google Chrome), and that the CEF Alloy bootstrap will be deleted in a few months (see #3685), I think we can just leave this unimplemented for Alloy and recommend that users start migrating to Chrome. |
Sounds good! Is there an easy way of trying out the new CEF Chrome bootstrap mode? cefclient / sefsimple is only using the alloy mode? |
Yes, just add the |
Awesome, just tried it out and it works out of the box. For reference: // @ts-check
// Requires: './cefclient --remote-debugging-port=1235 --url=about:blank --enable-chrome-runtime
import { chromium } from 'playwright';
process.env.PW_CHROMIUM_ATTACH_TO_OTHER = '1';
(async () => {
const browser = await chromium.connectOverCDP('http://localhost:1235');
const defaultContext = browser.contexts()[0];
const defaultPage = defaultContext.pages()[0];
await defaultPage.goto('http://example.com');
console.log(await defaultPage.title());
console.log(defaultPage.url());
await defaultContext.close();
await browser.close();
})(); |
Describe the bug
Currently
CefDevToolsManagerDelegate::GetDefaultBrowserContext
is not implemented, this causes the following CDP calls to fail:When implementing the method like done in Electron, things will start working: electron/electron#41738. This also makes it then compatible with Playwright.
There was a quite popular feature request on our side about connecting to CEF instances from Playwright: microsoft/playwright#10927
To Reproduce
Steps to reproduce the behavior:
mkdir repro && cd repro && npm init -y && npm install playwright
test.mjs
filenode test.mjs
It throws with
Browser context management not supported
from here.Expected behavior
CDP calls work.
Screenshots
N/A
Versions (please complete the following information):
Additional context
Does the problem reproduce with the cefclient or cefsimple sample application at the same version?
Yes
Does the problem reproduce with Google Chrome at the same version?
No
Add any other context about the problem here.
I'm currently working on a fix.
The text was updated successfully, but these errors were encountered: