I'm really curious to know how Playwright does it, and why it uses this approach rather than the WebKit binaries that come with macOS.
Some more specifics:
Note, I also posted this in the GitHib repo, not sure where was best. Best regards.
This thread is trying to answer question "How does Playwright track, build, and embed the open-source WebKit, and can it work with a company's own patched WebKit binaries?"
thanks for the response @dand33 ๐
Its a great answer that abstracts the away the specifics of embedding each browser, which is great, but im more curious about the specifics between PW and WebKit. Specifically, questions 1 and 3.
I wasnt able to find how PW talks to WebKit in the repo, so thats why I am asking here. If i can get redirected to where that logic is, that would be great as well. Thanks!
https://github.com/microsoft/playwright/issues/5795 and here's something about browser versions
Here's something from 2 years ago with a presentation about the architecture of Playwright: https://www.youtube.com/watch?v=PXTspGn1im0
Basically Playwright supports 3 engines: Chromium, Firefox, WebKit.
Chromium-based browsers are supported without patches, as long as they match the supported versions listed in the release notes.
Firefox requires patches to its devtools protocol (Juggler).
Safari isn't cross-platform, so Playwright provides a cross-platform WebKit browser. (And I think it has some patches for the WebKit inspector protocol as well?)
In most cases it's best and most convenient to just use the Playwright-provided browsers. npx playwright install
installs them.
https://playwright.dev/docs/browsers
You can also use channels for Chrome and Edge.
Perhaps when WebDriver BiDi catches up to the capabilities required for Playwright, then Playwright may start using that protocol, and no longer needs to provide patched or custom-built browsers.
its all open source: https://github.com/microsoft/playwright/tree/main/browser_patches
they are in the subfolder: https://github.com/microsoft/playwright/blob/main/browser_patches/webkit/patches/bootstrap.diff
i want to experiment with a couple things:
Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email [email protected].