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: README.md
+46-9Lines changed: 46 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ Before using this plugin, save the BrowserStack username and access key to envir
15
15
Project name and build name will be displayed in BrowserStack if you set the environment variables `BROWSERSTACK_PROJECT_NAME` and `BROWSERSTACK_BUILD_ID`.
16
16
17
17
If you have troubles starting multiple browsers at once, or get `browserstack-local` related errors like [#27](https://github.com/DevExpress/testcafe-browser-provider-browserstack/issues/27),
18
-
try setting the `BROWSERSTACK_PARALLEL_RUNS` environment variable to the number of browsers you want to run simultaneously, or to 1 if you want to run just one browser.
18
+
try setting the `BROWSERSTACK_PARALLEL_RUNS` environment variable to the number of browsers you want to run simultaneously, or to 1 if you want to run just one browser.
19
19
20
20
You can determine the available browser aliases by running
21
21
```
@@ -45,29 +45,66 @@ Tip: you can skip version (`@53.0`) or/and OS name (`:Windows 10`).
45
45
Proxy options can be passed via envrionment variables.
46
46
47
47
-`BROWSERSTACK_PROXY` - a string that specifies a proxy for the Browserstack local binary. It should have the following structure: `user:pass@proxyHostName:port`,
48
-
-`BROWERSTACK_LOCAL_PROXY` - a string that specifies a proxy for the local web server. It should have the following structure: `user:pass@proxyHostName:port`,
48
+
-`BROWERSTACK_LOCAL_PROXY` - a string that specifies a proxy for the local web server. It should have the following structure: `user:pass@proxyHostName:port`,
49
49
-`BROWSERSTACK_FORCE_PROXY` - if it's not empty, forces all traffic of Browserstack local binary to go through the proxy,
50
50
-`BROWSERSTACK_FORCE_LOCAL` - if it's not empty, forces all traffic of Browserstack local binary to go through the local machine
51
51
52
-
## Browserstack JS Testing and Browserstack Automate
JS testing supports more types of devices (compare: [JS Testing devices](https://www.browserstack.com/list-of-browsers-and-platforms?product=js_testing)
58
-
vs [Automate devices](https://www.browserstack.com/list-of-browsers-and-platforms?product=automate)),
59
-
while Automate allows for much longer tests ([2 hours](https://www.browserstack.com/automate/timeouts) vs [30 minutes](https://github.com/browserstack/api#timeout300))
65
+
66
+
JS testing supports more types of devices (compare: [JS Testing devices](https://www.browserstack.com/list-of-browsers-and-platforms?product=js_testing)
67
+
vs [Automate devices](https://www.browserstack.com/list-of-browsers-and-platforms?product=automate)),
68
+
while Automate allows for much longer tests ([2 hours](https://www.browserstack.com/automate/timeouts) vs [30 minutes](https://github.com/browserstack/api#timeout300))
60
69
and provides some additional features (like the window resizing functionality).
61
-
62
-
TestCafe uses the JS Testing API by default. In order to use Browserstack Automate,
70
+
71
+
TestCafe uses the JS Testing API by default. In order to use Browserstack Automate,
63
72
set the `BROWSERSTACK_USE_AUTOMATE` environment variable to `1`.
64
73
74
+
Example:
75
+
```
76
+
export BROWSERSTACK_USE_AUTOMATE="1"
77
+
testcafe browserstack:chrome test.js
78
+
```
79
+
65
80
## Setting display resolution
66
81
67
82
To set the display resolution, use the `BROWSERSTACK_DISPLAY_RESOLUTION` environment variable.
68
83
Valid resolutions can be found [here](https://github.com/browserstack/api#resolution).
69
84
70
85
Remember that this only sets the display resolution and does not resize the browser window. You'll still need to use TestCafe's [window resizing API](https://devexpress.github.io/testcafe/documentation/test-api/actions/resize-window.html) to do so.
71
86
87
+
Example:
88
+
```
89
+
export BROWSERSTACK_DISPLAY_RESOLUTION="1024x768"
90
+
testcafe browserstack:chrome test.js
91
+
```
92
+
93
+
## Specyfing Chrome Command Line Arguments
94
+
95
+
To set [Chrome command line arguments](https://peter.sh/experiments/chromium-command-line-switches/), use the `BROWSERSTACK_CHROME_ARGS` environment variable. You can specify multiple arguments by joining them with the space symbol. This option works only if the [Browserstack Automate API is enabled](https://github.com/ondrejbartas/testcafe-browser-provider-browserstack/#browserstack-js-testing-and-browserstack-automate).
0 commit comments