Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
chore: fix Java CLI invocation on Windows (#19895)
Max Schmittddccb590932f
diff --git a/docs/src/browsers.md b/docs/src/browsers.mdindex ecf5a7246d..e438f25769 100644--- a/docs/src/browsers.md+++ b/docs/src/browsers.md@@ -126,11 +126,11 @@ pwsh bin/Debug/netX/playwright.ps1 install msedge``````batch lang=java-mvn exec:java -e -Dexec.mainClass=com.microsoft.playwright.CLI -Dexec.args="install msedge"+mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="install msedge"``````powershell lang=java-mvn exec:java -e -Dexec.mainClass=com.microsoft.playwright.CLI -Dexec.args="install msedge"+mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="install msedge"```Run with `--help` option to see full list of the browsers that can be installed this way.@@ -262,17 +262,17 @@ playwright install``````bash tab=bash-bash lang=java-PLAYWRIGHT_BROWSERS_PATH=$HOME/pw-browsers mvn exec:java -e -Dexec.mainClass=com.microsoft.playwright.CLI -Dexec.args="install"+PLAYWRIGHT_BROWSERS_PATH=$HOME/pw-browsers mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="install"``````batch tab=bash-batch lang=javaset PLAYWRIGHT_BROWSERS_PATH=%USERPROFILE%\pw-browsers-mvn exec:java -e -Dexec.mainClass=com.microsoft.playwright.CLI -Dexec.args="install"+mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="install"``````powershell tab=bash-powershell lang=java$env:PLAYWRIGHT_BROWSERS_PATH="$env:USERPROFILE\pw-browsers"-mvn exec:java -e -Dexec.mainClass=com.microsoft.playwright.CLI -Dexec.args="install"+mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="install"``````bash tab=bash-bash lang=csharp@@ -436,17 +436,17 @@ playwright install``````bash tab=bash-bash lang=java-HTTPS_PROXY=https://192.0.2.1 mvn exec:java -e -Dexec.mainClass=com.microsoft.playwright.CLI -Dexec.args="install"+HTTPS_PROXY=https://192.0.2.1 mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="install"``````batch tab=bash-batch lang=javaset HTTPS_PROXY=https://192.0.2.1-mvn exec:java -e -Dexec.mainClass=com.microsoft.playwright.CLI -Dexec.args="install"+mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="install"``````powershell tab=bash-powershell lang=java$env:HTTPS_PROXY="https://192.0.2.1"-mvn exec:java -e -Dexec.mainClass=com.microsoft.playwright.CLI -Dexec.args="install"+mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="install"``````bash tab=bash-bash lang=csharp@@ -511,17 +511,17 @@ playwright install``````bash tab=bash-bash lang=java-PLAYWRIGHT_DOWNLOAD_CONNECTION_TIMEOUT=120000 mvn exec:java -e -Dexec.mainClass=com.microsoft.playwright.CLI -Dexec.args="install"+PLAYWRIGHT_DOWNLOAD_CONNECTION_TIMEOUT=120000 mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="install"``````batch tab=bash-batch lang=javaset PLAYWRIGHT_DOWNLOAD_CONNECTION_TIMEOUT=120000-mvn exec:java -e -Dexec.mainClass=com.microsoft.playwright.CLI -Dexec.args="install"+mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="install"``````powershell tab=bash-powershell lang=java$env:PLAYWRIGHT_DOWNLOAD_CONNECTION_TIMEOUT="120000"-mvn exec:java -e -Dexec.mainClass=com.microsoft.playwright.CLI -Dexec.args="install"+mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="install"``````bash tab=bash-bash lang=csharp@@ -592,17 +592,17 @@ playwright install``````bash tab=bash-bash lang=java-PLAYWRIGHT_DOWNLOAD_HOST=192.0.2.1 mvn exec:java -e -Dexec.mainClass=com.microsoft.playwright.CLI -Dexec.args="install"+PLAYWRIGHT_DOWNLOAD_HOST=192.0.2.1 mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="install"``````batch tab=bash-batch lang=javaset PLAYWRIGHT_DOWNLOAD_HOST=192.0.2.1-mvn exec:java -e -Dexec.mainClass=com.microsoft.playwright.CLI -Dexec.args="install"+mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="install"``````powershell tab=bash-powershell lang=java$env:PLAYWRIGHT_DOWNLOAD_HOST="192.0.2.1"-mvn exec:java -e -Dexec.mainClass=com.microsoft.playwright.CLI -Dexec.args="install"+mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="install"``````bash tab=bash-bash lang=csharp@@ -674,19 +674,19 @@ playwright install``````bash tab=bash-bash lang=java-PLAYWRIGHT_FIREFOX_DOWNLOAD_HOST=203.0.113.3 PLAYWRIGHT_DOWNLOAD_HOST=192.0.2.1 mvn exec:java -e -Dexec.mainClass=com.microsoft.playwright.CLI -Dexec.args="install"+PLAYWRIGHT_FIREFOX_DOWNLOAD_HOST=203.0.113.3 PLAYWRIGHT_DOWNLOAD_HOST=192.0.2.1 mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="install"``````batch tab=bash-batch lang=javaset PLAYWRIGHT_FIREFOX_DOWNLOAD_HOST=203.0.113.3set PLAYWRIGHT_DOWNLOAD_HOST=192.0.2.1-mvn exec:java -e -Dexec.mainClass=com.microsoft.playwright.CLI -Dexec.args="install"+mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="install"``````powershell tab=bash-powershell lang=java$env:PLAYWRIGHT_FIREFOX_DOWNLOAD_HOST="203.0.113.3"$env:PLAYWRIGHT_DOWNLOAD_HOST="192.0.2.1"-mvn exec:java -e -Dexec.mainClass=com.microsoft.playwright.CLI -Dexec.args="install"+mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="install"``````bash tab=bash-bash lang=csharpdiff --git a/docs/src/ci.md b/docs/src/ci.mdindex 22d994250b..58cf983f40 100644--- a/docs/src/ci.md+++ b/docs/src/ci.md@@ -29,7 +29,7 @@ configurations for common CI providers.playwright install --with-deps``````bash java- mvn exec:java -e -Dexec.mainClass=com.microsoft.playwright.CLI -Dexec.args="install --with-deps"+ mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="install --with-deps"``````bash csharppwsh bin/Debug/netX/playwright.ps1 install --with-deps@@ -103,7 +103,7 @@ steps:- name: Build & Installrun: mvn -B install -D skipTests --no-transfer-progress- name: Install Playwright- run: mvn exec:java -e -Dexec.mainClass=com.microsoft.playwright.CLI -Dexec.args="install --with-deps"+ run: mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="install --with-deps"- name: Run testsrun: mvn test```@@ -228,7 +228,7 @@ steps:- name: Build & Installrun: mvn -B install -D skipTests --no-transfer-progress- name: Install Playwright- run: mvn exec:java -e -Dexec.mainClass=com.microsoft.playwright.CLI -Dexec.args="install --with-deps"+ run: mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="install --with-deps"- name: Run testsrun: mvn test```diff --git a/docs/src/cli.md b/docs/src/cli.mdindex d4b1aa8d02..d836384196 100644--- a/docs/src/cli.md+++ b/docs/src/cli.md@@ -12,7 +12,7 @@ npx playwright --help``````bash java-mvn exec:java -e -Dexec.mainClass=com.microsoft.playwright.CLI+mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI``````bash python@@ -44,7 +44,7 @@ npx playwright install```bash java# Running without arguments will install default browsers-mvn exec:java -e -Dexec.mainClass=com.microsoft.playwright.CLI -Dexec.args="install"+mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="install"``````bash python@@ -66,7 +66,7 @@ npx playwright install webkit```bash java# Install WebKit-mvn exec:java -e -Dexec.mainClass=com.microsoft.playwright.CLI -Dexec.args="install webkit"+mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="install webkit"``````bash python@@ -86,7 +86,7 @@ npx playwright install --help``````bash java-mvn exec:java -e -Dexec.mainClass=com.microsoft.playwright.CLI -Dexec.args="install --help"+mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="install --help"``````bash python@@ -108,7 +108,7 @@ npx playwright install-deps```bash java# See command help-mvn exec:java -e -Dexec.mainClass=com.microsoft.playwright.CLI -Dexec.args="install-deps"+mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="install-deps"``````bash python@@ -128,7 +128,7 @@ npx playwright install-deps chromium``````bash java-mvn exec:java -e -Dexec.mainClass=com.microsoft.playwright.CLI -Dexec.args="install-deps chromium"+mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="install-deps chromium"``````bash python@@ -146,7 +146,7 @@ npx playwright install --with-deps chromium``````bash java-mvn exec:java -e -Dexec.mainClass=com.microsoft.playwright.CLI -Dexec.args="install --with-deps chromium"+mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="install --with-deps chromium"``````bash python@@ -164,7 +164,7 @@ npx playwright codegen wikipedia.org``````bash java-mvn exec:java -e -Dexec.mainClass=com.microsoft.playwright.CLI -Dexec.args="codegen wikipedia.org"+mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="codegen wikipedia.org"``````bash python@@ -190,7 +190,7 @@ npx playwright codegen --save-storage=auth.json``````bash java-mvn exec:java -e -Dexec.mainClass=com.microsoft.playwright.CLI -Dexec.args="codegen --save-storage=auth.json"+mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="codegen --save-storage=auth.json"# Perform authentication and exit.# auth.json will contain the storage state.```@@ -216,8 +216,8 @@ npx playwright codegen --load-storage=auth.json my.web.app``````bash java-mvn exec:java -e -Dexec.mainClass=com.microsoft.playwright.CLI -Dexec.args="open --load-storage=auth.json my.web.app"-mvn exec:java -e -Dexec.mainClass=com.microsoft.playwright.CLI -Dexec.args="codegen --load-storage=auth.json my.web.app"+mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="open --load-storage=auth.json my.web.app"+mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="codegen --load-storage=auth.json my.web.app"# Perform authentication and exit.# auth.json will contain the storage state.```@@ -339,7 +339,7 @@ npx playwright open example.com```bash java# Open page in Chromium-mvn exec:java -e -Dexec.mainClass=com.microsoft.playwright.CLI -Dexec.args="open example.com"+mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="open example.com"``````bash python@@ -359,7 +359,7 @@ npx playwright wk example.com```bash java# Open page in WebKit-mvn exec:java -e -Dexec.mainClass=com.microsoft.playwright.CLI -Dexec.args="wk example.com"+mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="wk example.com"``````bash python@@ -382,7 +382,7 @@ npx playwright open --device="iPhone 11" wikipedia.org```bash java# Emulate iPhone 11.-mvn exec:java -e -Dexec.mainClass=com.microsoft.playwright.CLI -Dexec.args='open --device="iPhone 11" wikipedia.org'+mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args='open --device="iPhone 11" wikipedia.org'``````bash python@@ -404,7 +404,7 @@ npx playwright open --viewport-size=800,600 --color-scheme=dark twitter.com```bash java# Emulate screen size and color scheme.-mvn exec:java -e -Dexec.mainClass=com.microsoft.playwright.CLI -Dexec.args="open --viewport-size=800,600 --color-scheme=dark twitter.com"+mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="open --viewport-size=800,600 --color-scheme=dark twitter.com"``````bash python@@ -428,7 +428,7 @@ npx playwright open --timezone="Europe/Rome" --geolocation="41.890221,12.492348"```bash java# Emulate timezone, language & location# Once page opens, click the "my location" button to see geolocation in action-mvn exec:java -e -Dexec.mainClass=com.microsoft.playwright.CLI -Dexec.args='open --timezone="Europe/Rome" --geolocation="41.890221,12.492348" --lang="it-IT" maps.google.com'+mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args='open --timezone="Europe/Rome" --geolocation="41.890221,12.492348" --lang="it-IT" maps.google.com'``````bash python@@ -507,7 +507,7 @@ npx playwright screenshot --help```bash java# See command help-mvn exec:java -e -Dexec.mainClass=com.microsoft.playwright.CLI -Dexec.args="screenshot --help"+mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="screenshot --help"``````bash python@@ -526,7 +526,7 @@ npx playwright screenshot \```bash java# Wait 3 seconds before capturing a screenshot after page loads ('load' event fires)-mvn exec:java -e -Dexec.mainClass=com.microsoft.playwright.CLI -Dexec.args='screenshot --device="iPhone 11" --color-scheme=dark --wait-for-timeout=3000 twitter.com twitter-iphone.png'+mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args='screenshot --device="iPhone 11" --color-scheme=dark --wait-for-timeout=3000 twitter.com twitter-iphone.png'``````bash python@@ -554,7 +554,7 @@ npx playwright screenshot --full-page en.wikipedia.org wiki-full.png```bash java# Capture a full page screenshot-mvn exec:java -e -Dexec.mainClass=com.microsoft.playwright.CLI -Dexec.args='screenshot --full-page en.wikipedia.org wiki-full.png'+mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args='screenshot --full-page en.wikipedia.org wiki-full.png'``````bash python@@ -578,7 +578,7 @@ npx playwright pdf https://en.wikipedia.org/wiki/PDF wiki.pdf```bash java# See command help-mvn exec:java -e -Dexec.mainClass=com.microsoft.playwright.CLI -Dexec.args="pdf https://en.wikipedia.org/wiki/PDF wiki.pdf"+mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="pdf https://en.wikipedia.org/wiki/PDF wiki.pdf"``````bash pythondiff --git a/docs/src/codegen-intro.md b/docs/src/codegen-intro.mdindex 6f27ee34d2..84e0fe196c 100644--- a/docs/src/codegen-intro.md+++ b/docs/src/codegen-intro.md@@ -17,7 +17,7 @@ npx playwright codegen demo.playwright.dev/todomvc``````bash java-mvn exec:java -e -Dexec.mainClass=com.microsoft.playwright.CLI -Dexec.args="codegen demo.playwright.dev/todomvc"+mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="codegen demo.playwright.dev/todomvc"``````bash pythondiff --git a/docs/src/codegen.md b/docs/src/codegen.mdindex e66a380053..d7d8769f49 100644--- a/docs/src/codegen.md+++ b/docs/src/codegen.md@@ -13,7 +13,7 @@ npx playwright codegen demo.playwright.dev/todomvc``````bash java-mvn exec:java -e -Dexec.mainClass=com.microsoft.playwright.CLI -Dexec.args="codegen demo.playwright.dev/todomvc"+mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="codegen demo.playwright.dev/todomvc"``````bash python@@ -40,7 +40,7 @@ npx playwright codegen --viewport-size=800,600 playwright.dev``````bash java-mvn exec:java -e -Dexec.mainClass=com.microsoft.playwright.CLI -Dexec.args="codegen --viewport-size=800,600 playwright.dev"+mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="codegen --viewport-size=800,600 playwright.dev"``````bash python@@ -64,7 +64,7 @@ npx playwright codegen --device="iPhone 11" playwright.dev``````bash java-mvn exec:java -e -Dexec.mainClass=com.microsoft.playwright.CLI -Dexec.args='codegen --device="iPhone 11" playwright.dev'+mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args='codegen --device="iPhone 11" playwright.dev'``````bash python@@ -86,7 +86,7 @@ npx playwright codegen --color-scheme=dark playwright.dev``````bash java-mvn exec:java -e -Dexec.mainClass=com.microsoft.playwright.CLI -Dexec.args="codegen --color-scheme=dark playwright.dev"+mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="codegen --color-scheme=dark playwright.dev"``````bash python@@ -108,7 +108,7 @@ npx playwright codegen --timezone="Europe/Rome" --geolocation="41.890221,12.4923``````bash java-mvn exec:java -e -Dexec.mainClass=com.microsoft.playwright.CLI -Dexec.args='codegen --timezone="Europe/Rome" --geolocation="41.890221,12.492348" --lang="it-IT" maps.google.com'+mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args='codegen --timezone="Europe/Rome" --geolocation="41.890221,12.492348" --lang="it-IT" maps.google.com'``````bash python@@ -132,7 +132,7 @@ npx playwright codegen --save-storage=auth.json``````bash java-mvn exec:java -e -Dexec.mainClass=com.microsoft.playwright.CLI -Dexec.args="codegen --save-storage=auth.json"+mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="codegen --save-storage=auth.json"``````bash python@@ -152,7 +152,7 @@ npx playwright codegen --load-storage=auth.json github.com/microsoft/playwright``````bash java-mvn exec:java -e -Dexec.mainClass=com.microsoft.playwright.CLI -Dexec.args="codegen --load-storage=auth.json github.com/microsoft/playwright"+mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="codegen --load-storage=auth.json github.com/microsoft/playwright"``````bash python@@ -172,7 +172,7 @@ npx playwright open --load-storage=auth.json github.com/microsoft/playwright``````bash java-mvn exec:java -e -Dexec.mainClass=com.microsoft.playwright.CLI -Dexec.args="open --load-storage=auth.json github.com/microsoft/playwright"+mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="open --load-storage=auth.json github.com/microsoft/playwright"``````bash pythondiff --git a/docs/src/debug.md b/docs/src/debug.mdindex e0cad775d9..f60f1c3b22 100644--- a/docs/src/debug.md+++ b/docs/src/debug.md@@ -187,7 +187,7 @@ npx playwright codegen wikipedia.org``````bash java-mvn exec:java -e -Dexec.mainClass=com.microsoft.playwright.CLI -Dexec.args="codegen wikipedia.org"+mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="codegen wikipedia.org"``````bash pythondiff --git a/docs/src/intro-java.md b/docs/src/intro-java.mdindex aa6e3d7708..a52657bfde 100644--- a/docs/src/intro-java.md+++ b/docs/src/intro-java.md@@ -79,7 +79,7 @@ public class App {With the Example.java and pom.xml above, compile and execute your new program as follows:```bash-mvn compile exec:java -Dexec.mainClass="org.example.App"+mvn compile exec:java -D exec.mainClass="org.example.App"```Running it downloads the Playwright package and installs browser binaries for Chromium, Firefox and WebKit. To modify this behavior see [installation parameters](./browsers.md#installing-browsers).@@ -115,7 +115,7 @@ playwright.firefox().launch(new BrowserType.LaunchOptions().setHeadless(false).s## Running the Example script```bash-mvn compile exec:java -Dexec.mainClass="org.example.App"+mvn compile exec:java -D exec.mainClass="org.example.App"```By default browsers launched with Playwright run headless, meaning no browser UI will open up when running the script. To change that you can pass `new BrowserType.LaunchOptions().setHeadless(false)` when launching the browser.diff --git a/docs/src/network.md b/docs/src/network.mdindex 71d6bd3456..4aadde01b4 100644--- a/docs/src/network.md+++ b/docs/src/network.md@@ -692,7 +692,7 @@ npx playwright open --save-har=example.har --save-har-glob="**/api/**" https://e```bash java# Save API requests from example.com as "example.har" archive.-mvn exec:java -e -Dexec.mainClass=com.microsoft.playwright.CLI -Dexec.args="open --save-har=example.har --save-har-glob='**/api/**' https://example.com"+mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="open --save-har=example.har --save-har-glob='**/api/**' https://example.com"``````bash pythondiff --git a/docs/src/release-notes-java.md b/docs/src/release-notes-java.mdindex b6680a4e27..b392a1d9b7 100644--- a/docs/src/release-notes-java.md+++ b/docs/src/release-notes-java.md@@ -206,7 +206,7 @@ Now you can record network traffic into a HAR file and re-use this traffic in yoTo record network into HAR file:```bash-mvn exec:java -e -Dexec.mainClass=com.microsoft.playwright.CLI -Dexec.args="open --save-har=example.har --save-har-glob='**/api/**' https://example.com"+mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="open --save-har=example.har --save-har-glob='**/api/**' https://example.com"```Alternatively, you can record HAR programmatically:@@ -520,7 +520,7 @@ Playwright Trace Viewer is now **available online** at https://trace.playwright.- Playwright now supports **Ubuntu 20.04 ARM64**. You can now run Playwright tests inside Docker on Apple M1 and on Raspberry Pi.- You can now use Playwright to install stable version of Edge on Linux:```bash- mvn exec:java -e -Dexec.mainClass=com.microsoft.playwright.CLI -Dexec.args="install msedge"+ mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="install msedge"```@@ -547,7 +547,7 @@ Read more about [`method: Locator.waitFor`].### 🎭 Playwright Trace Viewer-- run trace viewer with `mvn exec:java -e -Dexec.mainClass=com.microsoft.playwright.CLI -Dexec.args="show-trace"` and drop trace files to the trace viewer PWA+- run trace viewer with `mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="show-trace"` and drop trace files to the trace viewer PWA- better visual attribution of action targetsRead more about [Trace Viewer](./trace-viewer).@@ -725,7 +725,7 @@ Traces are examined later with the Playwright CLI:```sh-mvn exec:java -e -Dexec.mainClass=com.microsoft.playwright.CLI -Dexec.args="show-trace trace.zip"+mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="show-trace trace.zip"```That will open the following GUI:@@ -836,7 +836,7 @@ This version of Playwright was also tested against the following stable channels- [Selecting elements based on layout](./other-locators.md#css-matching-elements-based-on-layout) with `:left-of()`, `:right-of()`, `:above()` and `:below()`.- Playwright now includes [command line interface](./cli.md), former playwright-cli.```bash java- mvn exec:java -e -Dexec.mainClass=com.microsoft.playwright.CLI -Dexec.args="--help"+ mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="--help"```- [`method: Page.selectOption`] now waits for the options to be present.- New methods to [assert element state](./actionability#assertions) like [`method: Page.isEditable`].diff --git a/docs/src/trace-viewer-intro-csharp-java-python.md b/docs/src/trace-viewer-intro-csharp-java-python.mdindex 7e48e8a043..a1383f451d 100644--- a/docs/src/trace-viewer-intro-csharp-java-python.md+++ b/docs/src/trace-viewer-intro-csharp-java-python.md@@ -95,7 +95,7 @@ npx playwright show-trace trace.zip``````bash java-mvn exec:java -e -Dexec.mainClass=com.microsoft.playwright.CLI -Dexec.args="show-trace trace.zip"+mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="show-trace trace.zip"``````bash pythondiff --git a/docs/src/trace-viewer.md b/docs/src/trace-viewer.mdindex c1cae4f537..aa81dbd0d6 100644--- a/docs/src/trace-viewer.md+++ b/docs/src/trace-viewer.md@@ -23,7 +23,7 @@ npx playwright show-trace trace.zip``````bash java-mvn exec:java -e -Dexec.mainClass=com.microsoft.playwright.CLI -Dexec.args="show-trace trace.zip"+mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="show-trace trace.zip"``````bash python@@ -263,7 +263,7 @@ npx playwright show-trace trace.zip``````bash java-mvn exec:java -e -Dexec.mainClass=com.microsoft.playwright.CLI -Dexec.args="show-trace trace.zip"+mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="show-trace trace.zip"``````bash python@@ -290,7 +290,7 @@ npx playwright show-trace https://example.com/trace.zip``````bash java-mvn exec:java -e -Dexec.mainClass=com.microsoft.playwright.CLI -Dexec.args="show-trace https://example.com/trace.zip"+mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="show-trace https://example.com/trace.zip"``````bash pythondiff --git a/packages/playwright-core/src/cli/cli.ts b/packages/playwright-core/src/cli/cli.tsindex 39a5238c11..19d692220d 100755--- a/packages/playwright-core/src/cli/cli.ts+++ b/packages/playwright-core/src/cli/cli.ts@@ -740,7 +740,7 @@ function buildBasePlaywrightCLICommand(cliTargetLang: string | undefined): strincase 'python':return `playwright`;case 'java':- return `mvn exec:java -e -Dexec.mainClass=com.microsoft.playwright.CLI -Dexec.args="...options.."`;+ return `mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="...options.."`;case 'csharp':return `pwsh bin/Debug/netX/playwright.ps1`;default:diff --git a/packages/playwright-core/src/server/registry/index.ts b/packages/playwright-core/src/server/registry/index.tsindex 97276a5041..52d2eeff04 100644--- a/packages/playwright-core/src/server/registry/index.ts+++ b/packages/playwright-core/src/server/registry/index.ts@@ -913,7 +913,7 @@ export function buildPlaywrightCLICommand(sdkLanguage: string, parameters: strincase 'python':return `playwright ${parameters}`;case 'java':- return `mvn exec:java -e -Dexec.mainClass=com.microsoft.playwright.CLI -Dexec.args="${parameters}"`;+ return `mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="${parameters}"`;case 'csharp':return `pwsh bin/Debug/netX/playwright.ps1 ${parameters}`;default:diff --git a/tests/installation/playwright-cli-install-should-work-with-languages.spec.ts b/tests/installation/playwright-cli-install-should-work-with-languages.spec.tsindex 4a3a913898..9dd44b75ea 100755--- a/tests/installation/playwright-cli-install-should-work-with-languages.spec.ts+++ b/tests/installation/playwright-cli-install-should-work-with-languages.spec.ts@@ -19,7 +19,7 @@ test('codegen should print the right install command without browsers', async ({await exec('npm i --foreground-scripts playwright', { env: { PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: '1' } });const pwLangName2InstallCommand = {- 'java': 'mvn exec:java -e -Dexec.mainClass=com.microsoft.playwright.CLI -Dexec.args="install"',+ 'java': 'mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="install"','python': 'playwright install','csharp': 'pwsh bin/Debug/netX/playwright.ps1 install','': 'npx playwright install',