From c9c5984b20fcd207f1786573984ca950f5bc1663 Mon Sep 17 00:00:00 2001 From: Michael Mintz Date: Tue, 21 Jan 2025 18:31:05 -0500 Subject: [PATCH] Update the docs --- help_docs/uc_mode.md | 8 +- integrations/docker/ReadMe.md | 4 +- seleniumbase/console_scripts/ReadMe.md | 150 +++++++++++++++---------- 3 files changed, 99 insertions(+), 63 deletions(-) diff --git a/help_docs/uc_mode.md b/help_docs/uc_mode.md index 02921e89..ef9d37f7 100644 --- a/help_docs/uc_mode.md +++ b/help_docs/uc_mode.md @@ -8,22 +8,22 @@ --- - +

(Watch the 1st UC Mode tutorial on YouTube! ▶️)

---- - +

(Watch the 2nd UC Mode tutorial on YouTube! ▶️)

---- - +

(Watch the 3rd UC Mode tutorial on YouTube! ▶️)

---- - +

(Watch the 4th UC Mode tutorial on YouTube! ▶️)

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