Skip to content

Commit b324f71

Browse files
committed
Update the desired capabilities ReadMe
1 parent f1fbaea commit b324f71

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

examples/capabilities/ReadMe.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ A sample run command may look like this when run from the [SeleniumBase/examples
88
pytest my_first_test.py --browser=remote --server=username:key@hub.browserstack.com --port=80 --cap_file=capabilities/sample_cap_file_BS.py
99
```
1010

11-
(You'll need to specify ``--server=SERVER``, ``--port=PORT``, and ``--cap_file=CAP_FILE.py``)
11+
(Parameters: ``--browser=remote``, ``--server=SERVER``, ``--port=PORT``, and ``--cap_file=CAP_FILE.py``)
1212

1313
Here's an example desired capabilities file:
1414
```python
@@ -31,11 +31,13 @@ caps['platform'] = "macOS 10.12"
3131
caps['version'] = "70.0"
3232
```
3333

34-
You can generate desired capabilities for [BrowserStack](https://www.browserstack.com/automate/capabilities), [Sauce Labs](https://wiki.saucelabs.com/display/DOCS/Platform+Configurator#/), and [TestingBot](https://testingbot.com/support/other/test-options) by following the links to their websites.
34+
(You'll notice that the browser is now being specified in the capabilities file, rather than with ``--browser=BROWSER``)
35+
36+
You can generate desired capabilities for [BrowserStack](https://www.browserstack.com/automate/capabilities), [Sauce Labs](https://wiki.saucelabs.com/display/DOCS/Platform+Configurator#/), and [TestingBot](https://testingbot.com/support/other/test-options) by following those links to their respective websites.
3537

3638
A regex parser was built into SeleniumBase to capture all lines from the specified desired capabilities file in the following formats:
3739
``'KEY': 'VALUE'``
3840
``caps['KEY'] = "VALUE"``
3941
(Each pair must be on a separate line. You can interchange single and double quotes.)
4042

41-
You can also swap ``--browser=remote`` with an actual browser, eg ``--browser=chrome``, which will combine the default SeleniumBase desired capabilities with those that were specified in the capabilities file when using ``--cap_file=FILE.py``. (For example, you'll need default SeleniumBase desired capabilities when using a proxy server, which is not the same as the Selenium Grid server.)
43+
You can also swap ``--browser=remote`` with an actual browser, eg ``--browser=chrome``, which will combine the default SeleniumBase desired capabilities with those that were specified in the capabilities file when using ``--cap_file=FILE.py``. Capabilities will override other parameters, so if you set the browser to one thing and the capabilities browser to another, SeleniumBase will use the capabilities browser as the browser. You'll need default SeleniumBase desired capabilities when using a proxy server (not the same as a Selenium Grid server), when downloading files to a desired folder, for disabling some warnings on Chrome, for overriding a website's Content Security Policy on Firefox, and for other reasons.

0 commit comments

Comments
 (0)