Skip to content

Commit 7550c2d

Browse files
committed
Update ReadMe files
1 parent d04f8aa commit 7550c2d

File tree

3 files changed

+25
-3
lines changed

3 files changed

+25
-3
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,16 @@ To make things easier, you can add your frequently-used proxies to PROXY_LIST in
348348
pytest proxy_test.py --proxy=proxy1
349349
```
350350

351+
352+
### <img src="https://cdn2.hubspot.net/hubfs/100006/images/super_square_logo_3a.png" title="SeleniumBase" height="32"> **Changing the User-Agent:**
353+
354+
If you wish to change the User-Agent for your browser tests (Chrome and Firefox only), you can add ``--agent="USER AGENT STRING"`` as an argument on the command line.
355+
356+
```bash
357+
pytest user_agent_test.py --agent="Mozilla/5.0 (Nintendo 3DS; U; ; en) Version/1.7412.EU"
358+
```
359+
360+
351361
<a id="utilizing_advanced_features"></a>
352362
### <img src="https://cdn2.hubspot.net/hubfs/100006/images/super_square_logo_3a.png" title="SeleniumBase" height="32"> **Production Environments & Integrations:**
353363

help_docs/ReadMe.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
> - [**Installing Python, Pip, & Git**](https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/install_python_pip_git.md)
88
> - [**Python Virtual Env Tutorial**](https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/virtualenv_instructions.md)
99
> - [**Verify Webdriver Installation**](https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/verify_webdriver.md)
10-
> - [**The Command Line Tutorial**](https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/command_line.md)
10+
> - [**The Command Line Tutorial**](https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/customizing_test_runs.md)
11+
> - [**The Console Scripts Tutorial**](https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/console_scripts/ReadMe.md)
1112
> - [**SeleniumBase Method Summary**](https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/method_summary.md)
1213
> - [**MySQL Installation Overview**](https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/mysql_installation.md)
1314
> - [**Safari Driver Detailed Info**](https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/using_safari_driver.md)

help_docs/customizing_test_runs.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ In addition to [settings.py](https://github.com/seleniumbase/SeleniumBase/blob/m
66
* Choose betweeen pytest & nose unittest runners
77
* Choose whether to enter Debug Mode on failures
88
* Choose additional variables to pass into tests
9+
* Choose the User-Agent for the browser to use
910
* Change the automation speed (with Demo Mode)
1011
* Choose whether to run tests multi-threaded
1112
* Choose whether to retry failing tests
@@ -39,9 +40,11 @@ pytest test_suite.py --reruns 1 --reruns-delay 2
3940

4041
pytest test_suite.py --server=IP_ADDRESS --port=4444
4142

42-
pytest test_suite.py --proxy=IP_ADDRESS:PORT
43+
pytest proxy_test.py --proxy=IP_ADDRESS:PORT
44+
45+
pytest proxy_test.py --proxy=USERNAME:PASSWORD@IP_ADDRESS:PORT
4346

44-
pytest test_suite.py --proxy=USERNAME:PASSWORD@IP_ADDRESS:PORT
47+
pytest user_agent_test.py --agent="USER-AGENT STRING"
4548

4649
pytest test_fail.py --pdb -s
4750
```
@@ -178,3 +181,11 @@ To make things easier, you can add your frequently-used proxies to PROXY_LIST in
178181
```bash
179182
pytest proxy_test.py --proxy=proxy1
180183
```
184+
185+
#### **Changing the User-Agent:**
186+
187+
If you wish to change the User-Agent for your browser tests (Chrome and Firefox only), you can add ``--agent="USER-AGENT STRING"`` as an argument on the command line.
188+
189+
```bash
190+
pytest user_agent_test.py --agent="Mozilla/5.0 (Nintendo 3DS; U; ; en) Version/1.7412.EU"
191+
```

0 commit comments

Comments
 (0)