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
Copy file name to clipboardExpand all lines: src/data/markdown/translated-guides/en/03 Using k6 browser/04 Migrating to k6 v0-46.md
+28-4Lines changed: 28 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -119,12 +119,11 @@ import { browser } from 'k6/experimental/browser';
119
119
120
120
## Browser options
121
121
122
-
In the updated version, the need to manually start a browser and set its configuration has been removed, and this part can simply be omitted from test scripts.
122
+
In the updated version, the need to manually start a browser and set its configuration has been removed, and this part can simply be omitted from test scripts. Users can still change some browser settings by using environment variables. For more information, refer to the [browser module options](/javascript-api/k6-experimental/browser/#browser-module-options) documentation.
123
123
124
-
Users can still change some browser settings by using environment variables. For more information, refer to the [browser module options](/javascript-api/k6-experimental/browser/#browser-module-options) documentation.
$ K6_BROWSER_HEADLESS=false K6_BROWSER_TIMEOUT='60s' k6 run script.js
147
+
```
148
+
149
+
```bash
150
+
# When using the `k6:master-with-browser` Docker image, you need to add `--cap-add=SYS_ADMIN`
151
+
# to grant further system permissions on the host for the Docker container.
152
+
docker run --rm -i --cap-add=SYS_ADMIN -e K6_BROWSER_HEADLESS=false -e K6_BROWSER_TIMEOUT='60s' grafana/k6:master-with-browser run - <script.js
153
+
```
154
+
155
+
```bash
156
+
C:\k6>set"K6_BROWSER_HEADLESS=false"&&set"K6_BROWSER_TIMEOUT='60s' "&& k6 run script.js
157
+
```
158
+
159
+
```bash
160
+
PS C:\k6>$env:K6_BROWSER_HEADLESS="false";$env:K6_BROWSER_TIMEOUT='60s'; k6 run script.js
161
+
```
162
+
163
+
</CodeGroup>
164
+
165
+
142
166
<Blockquotemod="note"title="">
143
167
144
168
The following browser options are no longer supported: `slowMo`, `devtools`, `env`, and `proxy` as they were not proving much value to our users. In the meantime, we're working on providing a much flexible version of `slowMo` (slow motion) option.
0 commit comments