Skip to content
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

feat: BiDi implementation of Puppeteer.connect for Firefox #11451

Merged
merged 14 commits into from Dec 1, 2023
Merged

Conversation

sadym-chromium
Copy link
Collaborator

@sadym-chromium sadym-chromium commented Nov 27, 2023

Add support of re-connecting to pure BiDi browser (Firefox).

  1. Split connection logic between common, BiDi and CDP.
  2. When connecting via BiDi protocol, first try to connect via BiDi, and if the endpoint does not support BiDi, fall back to BiDi over CDP.
  3. Adjust BiDi connection to fail gracefully if endpoint supports CDP.
  4. Add unbind to BiDi connection to be able to keep WS transport open.

@OrKoN OrKoN changed the title feat: support Puppeteer.connect with FireFox feat: support Puppeteer.connect with Firefox Nov 27, 2023
@sadym-chromium
Copy link
Collaborator Author

Converting to draft, as there seems to be significant regression and lots of tests are failing now.

@sadym-chromium
Copy link
Collaborator Author

Tests are still timing out, but the concerns are addressed.

Copy link

🤖 I detect that the PR title and the commit message differ and there's only one commit. To use the PR title for the commit history, you can use Github's automerge feature with squashing, or use automerge label. Good luck human!

-- conventional-commit-lint bot
https://conventionalcommits.org/

@sadym-chromium sadym-chromium marked this pull request as ready for review November 30, 2023 14:47
@sadym-chromium
Copy link
Collaborator Author

@OrKoN PTAL

test/TestExpectations.json Outdated Show resolved Hide resolved
@OrKoN
Copy link
Collaborator

OrKoN commented Nov 30, 2023

Please include in the title that it is about WebDriver BiDi

@sadym-chromium sadym-chromium changed the title feat: support Puppeteer.connect with Firefox feat: BiDi Firefox implementation of Puppeteer.connect Nov 30, 2023
test/TestExpectations.json Outdated Show resolved Hide resolved
Maksim Sadym and others added 14 commits December 1, 2023 09:21
* d88f2b67df8 fix: handle close
* 028213092b6 Revert "Close CDP connection when closing BiDi over CDP"
* 85ed086f6de Close CDP connection when closing BiDi over CDP
* d2650c54329 Rename
* c16b85c3eb5 Proper clean up BiDi connection
* 7c3eeef8e19 reformat
* cce2da7a976 comment
* 0d8c3222004 `DEFAULT_VIEWPORT`
* eb2323148b0 Inline `_getCdpConnection`
* c5c465d5900 comment
* e8f91a584e1 Rename `wsTransport` to `connectionTransport`
* 72aff3ed6bf comment
* e3e92ae4246 Unbind BiDi connection
* 9415e646047 comment
* ca6ce356990 format
* d8052d913a5 Use proper close call
* 55c0bc12339 proper close
* adf968bd1be Refactor getting WS connection
* be7fe15bd59 Reuse WS connection
* 7671c2e4aab Split BiDi and CDP logic
* bccf15cbe76 feat: implement `Puppeteer.connect` for FireFox
Co-authored-by: Alex Rudenko <OrKoN@users.noreply.github.com>
Co-authored-by: Alex Rudenko <OrKoN@users.noreply.github.com>
@OrKoN OrKoN changed the title feat: BiDi Firefox implementation of Puppeteer.connect feat: BiDi implementation of Puppeteer.connect for Firefox Dec 1, 2023
@sadym-chromium sadym-chromium enabled auto-merge (squash) December 1, 2023 08:26
@OrKoN OrKoN disabled auto-merge December 1, 2023 08:26
@OrKoN OrKoN enabled auto-merge (squash) December 1, 2023 08:26
@OrKoN OrKoN merged commit be081ba into main Dec 1, 2023
52 checks passed
@OrKoN OrKoN deleted the sadym/ff-connect branch December 1, 2023 08:30
@release-please release-please bot mentioned this pull request Dec 1, 2023
@Zapeth
Copy link

Zapeth commented Dec 22, 2023

Are there any settings required in Firefox for this to work, apart from fission.webContentIsolationStrategy=0?

I get Firefox is not supported in BiDi over CDP mode error when trying to connect() with protocol: 'webDriverBiDi' (I also tried setting fission.bfcacheInParent=false, but that only gets rid of the CDP warnings in Firefox output)

However, launch() with {product: 'firefox', protocol: 'webDriverBiDi', executablePath: '/usr/bin/firefox'} works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants