Skip to content

Commit 65b6a11

Browse files
docs: explain launchOption (#14)
1 parent 4f6b001 commit 65b6a11

File tree

1 file changed

+47
-2
lines changed

1 file changed

+47
-2
lines changed

README.md

+47-2
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ libraryDependencies += "com.google.guava" % "guava" % "33.0.0-jre"
3939
## Compatibility notes
4040
### Scala versions
4141
* This library can be used with any scala version 2.x and 3.x
42-
* This project is compiled with scala 2.12.18
42+
* This project is compiled with scala 2.12.20
4343
### sbt versions
4444
* This library can be used with any sbt version 1.x
4545
### Playwright versions
46-
* This library can be used with playwright version 1.40.0 `"com.microsoft.playwright" % "playwright" % "1.40.0"`
46+
* This library can be used with playwright version 1.49.0 `"com.microsoft.playwright" % "playwright" % "1.49.0"`
4747
### JDK versions
4848
* This library is tested on JDK11 and JDK21
4949

@@ -56,6 +56,51 @@ jsEnv := new jsenv.playwright.PWEnv(
5656
)
5757
```
5858

59+
## Launch options
60+
61+
The launch options are used to enable/disable the browser features. They can be overridden via the launchOptions parameter or extended via the additionalLaunchOptions parameter.
62+
63+
When not passing launchOptions, default launch options are as follows:
64+
65+
### Chrome/chromium
66+
```scala
67+
jsEnv := new jsenv.playwright.PWEnv(
68+
browserName = "chrome",
69+
launchOptions = List(
70+
"--disable-extensions",
71+
"--disable-web-security",
72+
"--allow-running-insecure-content",
73+
"--disable-site-isolation-trials",
74+
"--allow-file-access-from-files",
75+
"--disable-gpu"
76+
)
77+
)
78+
```
79+
80+
### Firefox
81+
```scala
82+
jsEnv := new jsenv.playwright.PWEnv(
83+
browserName = "firefox",
84+
launchOptions = List(
85+
"--disable-web-security"
86+
)
87+
)
88+
```
89+
90+
### Webkit
91+
```scala
92+
jsEnv := new jsenv.playwright.PWEnv(
93+
browserName = "webkit",
94+
launchOptions = List(
95+
"--disable-extensions",
96+
"--disable-web-security",
97+
"--allow-running-insecure-content",
98+
"--disable-site-isolation-trials",
99+
"--allow-file-access-from-files"
100+
)
101+
)
102+
```
103+
59104
## KeepAlive configuration
60105
It is work in progress.
61106
As a workaround introducing delay in the test cases may help to keep the browser alive.

0 commit comments

Comments
 (0)