microsoft / playwright

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
https://playwright.dev
Apache License 2.0
65.98k stars 3.59k forks source link

[Docs]: Clarify WebKit Feature Support on Non-Apple Platforms #31017

Closed bc-lee closed 2 months ago

bc-lee commented 4 months ago

Page(s)

docs/src/browsers.md

Description

While WebKit is available on all three major platforms (Windows, Linux, and macOS), platform-specific feature support differs between Apple's platform and others. This is because Apple only ships WebKit as a browser engine on their platform, and almost no other browser uses WebKit as its engine. (Gnome Web is an exception, but it's not designed to be a general-purpose browser like Chrome or Firefox.)

For example, comparing WebKit's Source/cmake/OptionsMac.cmake and Source/cmake/OptionsGTK.cmake, we can see several APIs such as WebRTC (#31016), Offscreen Canvas(#31004), are disabled on WebKitGTK. Also, playwright's patch in browser_patches/webkit/patches/bootstrap.diff disable more features on WebKitGTK.

While having a WebKit as a testable browser engine other than macOS is great, I believe it is important to notify users about the current state of WebKit on non-Apple platforms. This will help users to understand why some features are not working on WebKit and help them to decide which browser engine to use for their tests.

I suggest adding a message like this to the WebKit section in the browser.md:

--- a/docs/src/browsers.md
+++ b/docs/src/browsers.md
@@ -462,6 +462,7 @@ Playwright's Firefox version matches the recent [Firefox Stable](https://www.moz
  ### WebKit

  Playwright's WebKit version matches the recent WebKit trunk build, before it is used in Apple Safari and other WebKit-based browsers. This gives a lot of lead time to react on the potential browser update issues. Playwright doesn't work with the branded version of Safari since it relies on patches. Instead you can test against the recent WebKit build.
+ Also note that WebKit on non-Apple platforms may have different feature support compared to Apple's platform. This is due to the fact that WebKit is mainly used on Apple's platform and other platforms may not have the same level of feature support. For getting the most accurate test results, it is recommended to test on Apple's platform if possible.

  ## Install behind a firewall or a proxy

This message will help users to understand the current state of WebKit on non-Apple platforms and help them to decide which browser engine to use for their tests. Thanks for the reading!

Theiaz commented 4 months ago

Hello, maybe it is possible to use the links you gave in your description also in the message for browser.md. These links helped me to understand the following error