Skip to content

Commit 391dfb4

Browse files
committed
Update the docs
1 parent 75f49a1 commit 391dfb4

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ SeleniumBase provides additional Pytest command-line options for tests:
211211
```bash
212212
--browser=BROWSER # (The web browser to use.)
213213
--cap-file=FILE # (The web browser's desired capabilities to use.)
214+
--cap-string=STRING # (The web browser's desired capabilities to use.)
214215
--settings-file=FILE # (Overrides SeleniumBase settings.py values.)
215216
--env=ENV # (Set a test environment. Use "self.env" to use this in tests.)
216217
--data=DATA # (Extra data to pass to tests. Use "self.data" in tests.)

examples/capabilities/ReadMe.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,16 @@ A regex parser was built into SeleniumBase to capture all lines from the specifi
5151
(Each pair must be on a separate line. You can interchange single and double quotes.)
5252

5353
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.
54+
55+
You can also set browser desired capabilities from a command line string:
56+
Example:
57+
```bash
58+
pytest test_swag_labs.py --cap-string='{"browserName":"chrome","name":"test1"}' --server="127.0.0.1" --browser=remote
59+
```
60+
(Enclose cap-string in single quotes. Enclose parameter keys in double quotes.)
61+
62+
If using a local Selenium Grid with SeleniumBase, make sure to start up the Grid Hub and nodes first:
63+
```bash
64+
seleniumbase grid-hub start
65+
seleniumbase grid-node start
66+
```

help_docs/customizing_test_runs.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ SeleniumBase provides additional Pytest command-line options for tests:
8484
```bash
8585
--browser=BROWSER # (The web browser to use.)
8686
--cap-file=FILE # (The web browser's desired capabilities to use.)
87+
--cap-string=STRING # (The web browser's desired capabilities to use.)
8788
--settings-file=FILE # (Overrides SeleniumBase settings.py values.)
8889
--env=ENV # (Set a test environment. Use "self.env" to use this in tests.)
8990
--data=DATA # (Extra data to pass to tests. Use "self.data" in tests.)

0 commit comments

Comments
 (0)