playwright-java icon indicating copy to clipboard operation
playwright-java copied to clipboard

[Docs]: trouble with the `mvn exec install webkit` command

Open hbrls opened this issue 10 months ago • 3 comments

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?

hbrls avatar Apr 07 '24 12:04 hbrls

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

yury-s avatar Apr 10 '24 17:04 yury-s

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'

hbrls avatar Apr 14 '24 04:04 hbrls

....../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?

yury-s avatar Apr 16 '24 18:04 yury-s

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.

mxschmitt avatar May 20 '24 14:05 mxschmitt