You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Download the driver from the canonical npm registry rather than
cdn.playwright.dev. Each platform's driver is assembled from the
playwright-core npm package plus the matching Node.js binary from
nodejs.org, the same way the upstream Playwright build does it,
mirroring the approach in playwright-dotnet#3322.
The npm package does not contain api.json, so generate_api.sh now
generates it from the upstream Playwright source at the exact commit
that produced the driver version (resolved via npm gitHead), instead
of relying on the bundled driver's print-api-json command.
References microsoft/playwright-internal#291
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2. Run the following script to download Playwright driver for all platforms into `driver-bundle/src/main/resources/driver/` directory (browser binaries for Chromium, Firefox and WebKit will be automatically downloaded later on first Playwright run).
23
+
2. Run the following script to download and assemble the Playwright driver for all platforms into `driver-bundle/src/main/resources/driver/` directory (browser binaries for Chromium, Firefox and WebKit will be automatically downloaded later on first Playwright run).
24
24
25
25
```bash
26
26
scripts/download_driver.sh
27
27
```
28
28
29
+
Each driver is assembled from the [`playwright-core`](https://www.npmjs.com/package/playwright-core) npm package (version pinned in [scripts/DRIVER_VERSION](scripts/DRIVER_VERSION)) and the matching Node.js binary from https://nodejs.org, the same way the upstream Playwright build does it.
30
+
29
31
### Building and running the tests with Maven
30
32
31
33
```bash
@@ -39,10 +41,9 @@ BROWSER=chromium mvn test -Dtest=TestPageNetworkSizes
39
41
40
42
### Generating API
41
43
42
-
Public Java API is generated from api.json which is produced by `print-api-json` command of playwright CLI. To regenerate Java interfaces for the current driver run the following commands:
44
+
Public Java API is generated from api.json, which is generated from the upstream Playwright source at the exact commit that produced the driver version in [scripts/DRIVER_VERSION](scripts/DRIVER_VERSION) (resolved via `npm view playwright@<version> gitHead`). `scripts/generate_api.sh` fetches a minimal upstream checkout automatically; set `PW_SRC_DIR` to reuse an existing `microsoft/playwright` checkout instead. To regenerate Java interfaces for the current driver run:
0 commit comments