playwright-java
playwright-java copied to clipboard
[Docs]: trouble with the `mvn exec install webkit` command
Page(s)
https://playwright.dev/java/docs/browsers
Description
The docs recommends to use mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="install webkit"
. It doesn't work for me. The console throws: error: unknown command ''install webkit''
, which from the node.js commander.
After a line by line debug, I suppose the problem is: the argv install webkit
is passed as aString -> "install webkit"
to node.js, not String[] -> ["install", "webkit"]
.
And the modified command works: mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.arguments=install,webkit
.
I'm on a Mac / IDEA, Java 11 / Maven 3.
I'm not sure if it's a bug. Could anyone help to figure out?
Hm, works fine for me, which playwright version do you use?
I just tried with our examples and playwright, 1.43.0:
$ mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="install webkit"
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------< org.example:examples >------------------------
[INFO] Building Playwright Client Examples 1.43.0
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- exec-maven-plugin:3.1.1:java (default-cli) @ examples ---
Downloading Webkit 17.4 (playwright build v1992) from https://playwright.azureedge.net/builds/webkit/1992/webkit-mac-13-arm64.zip
66.2 MiB [====================] 100% 0.0s
Webkit 17.4 (playwright build v1992) downloaded to /Users/user/Library/Caches/ms-playwright/webkit-1992
I've tried 1.20 -> 1.43. None of them worked.
....../corretto-11.0.22/Contents/Home/bin/java ...... exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="install webkit"
......
[INFO] --- exec:3.2.0:java (default-cli) @ playwrightx ---
error: unknown command 'install webkit'
....../corretto-11.0.22/Contents/Home/bin/java ...... exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="install webkit"
This command is different from mvn exec:java ...
, you may need to adjust arguments list for it. What is the exact command you are running?
Closing as part of the triage process since it seemed stale. Please create a new issue with a detailed reproducible or feature request if you still face issues.