Update the docs

This commit is contained in:
Michael Mintz 2025-01-21 18:31:05 -05:00
parent 70be9b0dc6
commit c9c5984b20
3 changed files with 99 additions and 63 deletions

View File

@ -8,22 +8,22 @@
--- ---
<!-- YouTube View --><a href="https://www.youtube.com/watch?v=5dMFI3e85ig"><img src="http://img.youtube.com/vi/5dMFI3e85ig/0.jpg" title="SeleniumBase on YouTube" width="350" /></a> <!-- YouTube View --><a href="https://www.youtube.com/watch?v=5dMFI3e85ig"><img src="http://img.youtube.com/vi/5dMFI3e85ig/0.jpg" title="SeleniumBase on YouTube" width="320" /></a>
<p>(<b><a href="https://www.youtube.com/watch?v=5dMFI3e85ig">Watch the 1st UC Mode tutorial on YouTube! ▶️</a></b>)</p> <p>(<b><a href="https://www.youtube.com/watch?v=5dMFI3e85ig">Watch the 1st UC Mode tutorial on YouTube! ▶️</a></b>)</p>
---- ----
<!-- YouTube View --><a href="https://www.youtube.com/watch?v=2pTpBtaE7SQ"><img src="http://img.youtube.com/vi/2pTpBtaE7SQ/0.jpg" title="SeleniumBase on YouTube" width="350" /></a> <!-- YouTube View --><a href="https://www.youtube.com/watch?v=2pTpBtaE7SQ"><img src="http://img.youtube.com/vi/2pTpBtaE7SQ/0.jpg" title="SeleniumBase on YouTube" width="320" /></a>
<p>(<b><a href="https://www.youtube.com/watch?v=2pTpBtaE7SQ">Watch the 2nd UC Mode tutorial on YouTube! ▶️</a></b>)</p> <p>(<b><a href="https://www.youtube.com/watch?v=2pTpBtaE7SQ">Watch the 2nd UC Mode tutorial on YouTube! ▶️</a></b>)</p>
---- ----
<!-- YouTube View --><a href="https://www.youtube.com/watch?v=-EpZlhGWo9k"><img src="http://img.youtube.com/vi/-EpZlhGWo9k/0.jpg" title="SeleniumBase on YouTube" width="350" /></a> <!-- YouTube View --><a href="https://www.youtube.com/watch?v=-EpZlhGWo9k"><img src="http://img.youtube.com/vi/-EpZlhGWo9k/0.jpg" title="SeleniumBase on YouTube" width="320" /></a>
<p>(<b><a href="https://www.youtube.com/watch?v=-EpZlhGWo9k">Watch the 3rd UC Mode tutorial on YouTube! ▶️</a></b>)</p> <p>(<b><a href="https://www.youtube.com/watch?v=-EpZlhGWo9k">Watch the 3rd UC Mode tutorial on YouTube! ▶️</a></b>)</p>
---- ----
<!-- YouTube View --><a href="https://www.youtube.com/watch?v=Mr90iQmNsKM"><img src="http://img.youtube.com/vi/Mr90iQmNsKM/0.jpg" title="SeleniumBase on YouTube" width="350" /></a> <!-- YouTube View --><a href="https://www.youtube.com/watch?v=Mr90iQmNsKM"><img src="http://img.youtube.com/vi/Mr90iQmNsKM/0.jpg" title="SeleniumBase on YouTube" width="320" /></a>
<p>(<b><a href="https://www.youtube.com/watch?v=Mr90iQmNsKM">Watch the 4th UC Mode tutorial on YouTube! ▶️</a></b>)</p> <p>(<b><a href="https://www.youtube.com/watch?v=Mr90iQmNsKM">Watch the 4th UC Mode tutorial on YouTube! ▶️</a></b>)</p>
---- ----

View File

@ -14,11 +14,11 @@ https://docs.docker.com/engine/install/
docker build -t seleniumbase . docker build -t seleniumbase .
If running on an Apple M1/M2 Mac, use this instead: **(NOTE) - If running on an Apple M1/M2 Mac, use this instead:**
docker build --platform linux/amd64 -t seleniumbase . docker build --platform linux/amd64 -t seleniumbase .
M1/M2 Mac users should also see [StackOverflow.com/a/76586216/7058266](https://stackoverflow.com/a/76586216/7058266) to **Enable Rosetta in Docker Desktop**. (Otherwise **you will** encounter errors like this when Chrome tries to launch: `"Chrome failed to start: crashed."`) **M1/M2 Mac users** should also see [StackOverflow.com/a/76586216/7058266](https://stackoverflow.com/a/76586216/7058266) to **Enable Rosetta in Docker Desktop**. (Otherwise **you will** encounter errors like this when Chrome tries to launch: `"Chrome failed to start: crashed."`)
#### 4. Run [the example test](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/my_first_test.py) with Chrome inside your Docker: (Once the test completes after a few seconds, you'll automatically exit the Docker shell) #### 4. Run [the example test](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/my_first_test.py) with Chrome inside your Docker: (Once the test completes after a few seconds, you'll automatically exit the Docker shell)

View File

@ -290,7 +290,9 @@ sbase mkdir ui_tests
* Options: * Options:
``-b`` / ``--basic`` (Only config files. No tests added.) ```bash
-b / --basic (Only config files. No tests added.)
```
* Output: * Output:
@ -350,27 +352,33 @@ sbase mkfile new_test.py
* Options: * Options:
``--uc`` (UC Mode boilerplate using SB context manager) ```bash
`-b` / `--basic` (Basic boilerplate / single-line test) --uc (UC Mode boilerplate using SB context manager)
`-r` / `--rec` (Adds Pdb+ breakpoint for Recorder Mode) -b / --basic (Basic boilerplate / single-line test)
``--url=URL`` (Makes the test start on a specific page) -r / --rec (Adds Pdb+ breakpoint for Recorder Mode)
--url=URL (Makes the test start on a specific page)
```
* Language Options: * Language Options:
``--en`` / ``--English`` | ``--zh`` / ``--Chinese`` ```bash
``--nl`` / ``--Dutch`` | ``--fr`` / ``--French`` --en / --English | --zh / --Chinese
``--it`` / ``--Italian`` | ``--ja`` / ``--Japanese`` --nl / --Dutch | --fr / --French
``--ko`` / ``--Korean`` | ``--pt`` / ``--Portuguese`` --it / --Italian | --ja / --Japanese
``--ru`` / ``--Russian`` | ``--es`` / ``--Spanish`` --ko / --Korean | --pt / --Portuguese
--ru / --Russian | --es / --Spanish
```
* Syntax Formats: * Syntax Formats:
``--bc`` / ``--basecase`` (BaseCase class inheritance) ```bash
``--pf`` / ``--pytest-fixture`` (sb pytest fixture) --bc / --basecase (BaseCase class inheritance)
``--cf`` / ``--class-fixture`` (class + sb pytest fixture) --pf / --pytest-fixture (sb pytest fixture)
``--cm`` / ``--context-manager`` (SB context manager) --cf / --class-fixture (class + sb pytest fixture)
``--dc`` / ``--driver-context`` (DriverContext manager) --cm / --context-manager (SB context manager)
``--dm`` / ``--driver-manager`` (Driver manager) --dc / --driver-context (DriverContext manager)
--dm / --driver-manager (Driver manager)
```
* Output: * Output:
@ -404,13 +412,15 @@ sbase codegen new_test.py --url=wikipedia.org
* Options: * Options:
``--url=URL`` (Sets the initial start page URL.) ```bash
``--edge`` (Use Edge browser instead of Chrome.) --url=URL (Sets the initial start page URL.)
``--gui`` / ``--headed`` (Use headed mode on Linux.) --edge (Use Edge browser instead of Chrome.)
``--uc`` / ``--undetected`` (Use undetectable mode.) --gui / --headed (Use headed mode on Linux.)
``--ee`` (Use SHIFT + ESC to end the recording.) --uc / --undetected (Use undetectable mode.)
``--overwrite`` (Overwrite file when it exists.) --ee (Use SHIFT + ESC to end the recording.)
``--behave`` (Also output Behave/Gherkin files.) --overwrite (Overwrite file when it exists.)
--behave (Also output Behave/Gherkin files.)
```
* Output: * Output:
@ -427,8 +437,10 @@ sbase recorder [OPTIONS]
* Options: * Options:
``--uc`` / ``--undetected`` (Use undetectable mode.) ```bash
``--behave`` (Also output Behave/Gherkin files.) --uc / --undetected (Use undetectable mode.)
--behave (Also output Behave/Gherkin files.)
```
* Output: * Output:
@ -450,11 +462,13 @@ sbase mkpres new_presentation.py --en
* Language Options: * Language Options:
``--en`` / ``--English`` | ``--zh`` / ``--Chinese`` ```bash
``--nl`` / ``--Dutch`` | ``--fr`` / ``--French`` --en / --English | --zh / --Chinese
``--it`` / ``--Italian`` | ``--ja`` / ``--Japanese`` --nl / --Dutch | --fr / --French
``--ko`` / ``--Korean`` | ``--pt`` / ``--Portuguese`` --it / --Italian | --ja / --Japanese
``--ru`` / ``--Russian`` | ``--es`` / ``--Spanish`` --ko / --Korean | --pt / --Portuguese
--ru / --Russian | --es / --Spanish
```
* Output: * Output:
@ -480,11 +494,13 @@ sbase mkchart new_chart.py --en
* Language Options: * Language Options:
``--en`` / ``--English`` | ``--zh`` / ``--Chinese`` ```bash
``--nl`` / ``--Dutch`` | ``--fr`` / ``--French`` --en / --English | --zh / --Chinese
``--it`` / ``--Italian`` | ``--ja`` / ``--Japanese`` --nl / --Dutch | --fr / --French
``--ko`` / ``--Korean`` | ``--pt`` / ``--Portuguese`` --it / --Italian | --ja / --Japanese
``--ru`` / ``--Russian`` | ``--es`` / ``--Spanish`` --ko / --Korean | --pt / --Portuguese
--ru / --Russian | --es / --Spanish
```
* Output: * Output:
@ -504,7 +520,9 @@ sbase print [FILE] [OPTIONS]
* Options: * Options:
``-n`` (Add line Numbers to the rows) ```bash
-n (Add line Numbers to the rows)
```
* Output: * Output:
@ -521,21 +539,27 @@ sbase translate [SB_FILE.py] [LANGUAGE] [ACTION]
* Languages: * Languages:
``--en`` / ``--English`` | ``--zh`` / ``--Chinese`` ```bash
``--nl`` / ``--Dutch`` | ``--fr`` / ``--French`` --en / --English | --zh / --Chinese
``--it`` / ``--Italian`` | ``--ja`` / ``--Japanese`` --nl / --Dutch | --fr / --French
``--ko`` / ``--Korean`` | ``--pt`` / ``--Portuguese`` --it / --Italian | --ja / --Japanese
``--ru`` / ``--Russian`` | ``--es`` / ``--Spanish`` --ko / --Korean | --pt / --Portuguese
--ru / --Russian | --es / --Spanish
```
* Actions: * Actions:
``-p`` / ``--print`` (Print translation output to the screen) ```bash
``-o`` / ``--overwrite`` (Overwrite the file being translated) -p / --print (Print translation output to the screen)
``-c`` / ``--copy`` (Copy the translation to a new ``.py`` file) -o / --overwrite (Overwrite the file being translated)
-c / --copy (Copy the translation to a new ``.py`` file)
```
* Options: * Options:
``-n`` (include line Numbers when using the Print action) ```bash
-n (include line Numbers when using the Print action)
```
* Output: * Output:
@ -573,7 +597,9 @@ sbase inject-objects [SB_FILE.py] [OPTIONS]
* Options: * Options:
``-c``, ``--comments`` (Add object selectors to the comments.) ```bash
-c / --comments (Add object selectors to the comments.)
```
* Output: * Output:
@ -591,7 +617,9 @@ sbase objectify [SB_FILE.py] [OPTIONS]
* Options: * Options:
``-c``, ``--comments`` (Add object selectors to the comments.) ```bash
-c / --comments (Add object selectors to the comments.)
```
* Output: * Output:
@ -611,7 +639,9 @@ sbase revert-objects [SB_FILE.py] [OPTIONS]
* Options: * Options:
``-c``, ``--comments`` (Keep existing comments for the lines.) ```bash
-c / --comments (Keep existing comments for the lines.)
```
* Output: * Output:
@ -639,7 +669,7 @@ Works on both Selenium IDE & Katalon Recorder scripts.
* Usage: * Usage:
``sbase encrypt`` OR ``sbase obfuscate`` ``sbase encrypt`` / ``sbase obfuscate``
* Output: * Output:
@ -650,7 +680,7 @@ Runs the password encryption/obfuscation tool.
* Usage: * Usage:
``sbase decrypt`` OR ``sbase unobfuscate`` ``sbase decrypt`` / ``sbase unobfuscate``
* Output: * Output:
@ -667,9 +697,11 @@ sbase proxy [OPTIONS]
* Options: * Options:
``--hostname=HOSTNAME`` (Set ``hostname``) (Default: ``127.0.0.1``) ```bash
``--port=PORT`` (Set ``port``) (Default: ``8899``) --hostname=HOSTNAME (Set `hostname`) (Default: `127.0.0.1`)
``--help`` / ``-h`` (Display list of all available ``proxy`` options.) --port=PORT (Set `port`) (Default: `8899`)
--help / -h (Display available `proxy` options.)
```
* Output: * Output:
@ -699,8 +731,10 @@ sbase grid-hub {start|stop|restart} [OPTIONS]
* Options: * Options:
``-v``, ``--verbose`` (Increases verbosity of logging output.) ```bash
``--timeout=TIMEOUT`` (Close idle browser windows after TIMEOUT seconds.) -v / --verbose (Increases verbosity of logging output.)
--timeout=TIMEOUT (Close idle browser windows after TIMEOUT seconds.)
```
* Output: * Output:
@ -720,8 +754,10 @@ sbase grid-node {start|stop|restart} [OPTIONS]
* Options: * Options:
``--hub=HUB_IP`` (The Grid Hub IP Address to connect to.) (Default: ``127.0.0.1``) ```bash
``-v``, ``--verbose`` (Increases verbosity of logging output.) --hub=HUB_IP (Grid Hub IP Address. Default: `127.0.0.1`)
-v / --verbose (Increases verbosity of logging output.)
```
* Output: * Output: