Open Bug 1917540 Opened 2 years ago Updated 4 months ago

[meta] Support WebDriver BiDi in Playwright

Categories

(Remote Protocol :: WebDriver BiDi, task)

task

Tracking

(Not tracked)

People

(Reporter: whimboo, Unassigned)

References

(Depends on 10 open bugs, Blocks 1 open bug, )

Details

(Keywords: meta)

User Story

Reference: https://github.com/microsoft/playwright/blob/main/tests/bidi/README.md

Steps:
* Clone Playwright: https://github.com/microsoft/playwright
* Run `npm install` (or `npm run clean` before in case of errors during installation)
* Run `npm run build` (as well each time you make modifications to the source)
* Run `npm run watch` (optional, to start the watch mode for incremental compilation)
* Use `DEBUG="pw:browser"` to log the output of Firefox to the terminal console
* Use `DEBUG="pw:protocol"` to log the usage of Juggler and CDP protocol to the terminal console
* Use `PWDEBUGIMPL=1` to see a full stack of where the error was thrown
* Use `PWTEST_FIREFOX_USER_PREFS='{"remote.log.level":"Trace"}'` to set custom Firefox preferences
* Use `PWTEST_USE_BIDI_EXPECTATIONS=1` to enable custom expectations (e.g. skipping tests that timeout)
* Use `BIDI_FFPATH=/%path%/%to%/%firefox%/%binary%` to use a custom build of Firefox
* Use `CI=1` to get test results written to `test-results/report.json`
* Update the `./expectationReporter` in `tests/bidi/playwright.config.ts` with `rebase: true` to update the expectation files
* Run tests: `npm run biditest -- --project='moz-firefox-%train%*' [%path%/%to%/%tests]` (train is one of `nightly`, `beta`, or `stable`)

Further to run only individual tests you can also use `it.only` (that prevents requiring the path as mentioned above)

Debug Playwright test and core code with VSCode:
* Run `npm run watch` to let the compiler create the source maps on file changes
* Add `.only` to the test (see above) that you want to debug
* Set your wanted breakpoint(s)
* Open the `Javascript Debugger Terminal` via the command palette (`Cmd+Shift+P`)
* Run the test command as listed above with the Javascript Debugger Terminal

This bug tracks the required tasks and enhancements to WebDriver BiDi to ensure full compatibility with Playwright. It identifies the existing feature gaps and outlines the work needed to close them, allowing seamless integration of WebDriver BiDi with Playwright's functionality.

Depends on: 1918287
Depends on: 1918288
User Story: (updated)
Depends on: 1904892
Depends on: 1932311

Trying to get Playwright tests and reporting correct results to the console I went through some issues. To help others to more easily run the tests I've put the required steps for running the tests into the user story field.

User Story: (updated)
User Story: (updated)
User Story: (updated)
User Story: (updated)
Depends on: 1939735
Depends on: 1940568
Depends on: 1938385
User Story: (updated)
Depends on: 1819902
Depends on: 1940688
User Story: (updated)
Depends on: 1979730
User Story: (updated)
User Story: (updated)
User Story: (updated)
Depends on: 1987932
User Story: (updated)
Depends on: 2000649
Depends on: 2002966
Depends on: 2003277
Depends on: 2005546
Depends on: 2005558
Depends on: 2006345
Depends on: 2014984
Depends on: 1866749
Depends on: 2005054
Depends on: 2042668
Depends on: 2042669
You need to log in before you can comment on or make changes to this bug.