Skip to content

Commit b65a6a1

Browse files
committed
Update output of "sbase options"
1 parent ae5ef5a commit b65a6a1

File tree

1 file changed

+16
-8
lines changed
  • seleniumbase/console_scripts

1 file changed

+16
-8
lines changed

seleniumbase/console_scripts/run.py

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -593,6 +593,8 @@ def show_options():
593593
c1 = colorama.Fore.BLUE + colorama.Back.LIGHTCYAN_EX
594594
c2 = colorama.Fore.BLUE + colorama.Back.LIGHTGREEN_EX
595595
c3 = colorama.Fore.BLUE + colorama.Back.LIGHTYELLOW_EX
596+
c4 = colorama.Fore.MAGENTA + colorama.Back.LIGHTYELLOW_EX
597+
c5 = colorama.Fore.RED + colorama.Back.LIGHTYELLOW_EX
596598
cr = colorama.Style.RESET_ALL
597599
sc = ("\n " + c2 + " ** " + c3 + " pytest CLI Options " + c2 + " ** " + cr)
598600
print(sc)
@@ -603,27 +605,29 @@ def show_options():
603605
line = '(Some options are Chromium-specific, e.g. "--guest --mobile")'
604606
print(line)
605607
op = "\n"
606-
op += '--browser=BROWSER (The web browser to use. Default: "chrome".)\n'
608+
op += '--browser=BROWSER (The web browser to use. Default is "chrome")\n'
607609
op += '--headless (Run tests headlessly. Default mode on Linux OS.)\n'
608610
op += '--demo (Slow down and visually see test actions as they occur.)\n'
609611
op += '--slow (Slow down the automation. Faster than using Demo Mode.)\n'
610612
op += '--reuse-session / --rs (Reuse browser session between tests.)\n'
611-
op += '--crumbs (Delete all cookies between tests reusing a session.)\n'
613+
op += '--crumbs (Clear all cookies between tests reusing a session.)\n'
612614
op += '--maximize (Start tests with the web browser window maximized.)\n'
613615
op += "--dashboard (Enable SeleniumBase's Dashboard at dashboard.html)\n"
614616
op += "--incognito (Enable Chromium's Incognito mode.)\n"
615617
op += "--guest (Enable Chromium's Guest mode.)\n"
616618
op += '-m=MARKER (Run tests with the specified pytest marker.)\n'
617619
op += '-n=NUM (Multithread the tests using that many threads.)\n'
618-
op += '-v (Verbose mode. Prints the full names of each test run.)\n'
620+
op += '-v (Verbose mode. Print the full names of each test run.)\n'
619621
op += '--html=report.html (Create a detailed pytest-html report.)\n'
620622
op += '--collect-only / --co (Only show discovered tests. No run.)\n'
621623
op += '--co -q (Only show full names of discovered tests. No run.)\n'
622-
op += '--trace (Enter Debug Mode immediately after starting any test.\n'
623-
op += ' n: Next line of method. s: Step through. c: Continue.)\n'
624-
op += '--pdb (Enter Debug Mode if a test fails. h: Help. c: Continue.\n'
625-
op += ' where: Stacktrace location. u: Up stack. d: Down stack.\n'
626-
op += ' longlist / ll: See code. dir(): List namespace objects.)\n'
624+
op += '--pdb (Enter the Post Mortem Debug Mode after any test fails.)\n'
625+
op += '--trace (Enter Debug Mode immediately after starting any test.)\n'
626+
op += ' | Debug Mode Commands >>> help / h: List all commands. |\n'
627+
op += ' | n: Next line of method. s: Step through. c: Continue. |\n'
628+
op += ' | return / r: Run until method returns. j: Jump to line. |\n'
629+
op += ' | where / w: Show stack spot. u: Up stack. d: Down stack. |\n'
630+
op += ' | longlist / ll: See code. dir(): List namespace objects. |\n'
627631
op += '-x (Stop running the tests after the first failure is reached.)\n'
628632
op += '--archive-logs (Archive old log files instead of deleting them.)\n'
629633
op += '--save-screenshot (Save a screenshot at the end of each test.)\n'
@@ -645,6 +649,10 @@ def show_options():
645649
op = op.replace("\n-", "\n" + c1 + "-").replace(' (', cr + ' (')
646650
op = op.replace(" / -", cr + " / " + c1 + "-")
647651
op = op.replace("=", c2 + "=" + c3)
652+
op = op.replace(" | ", " |" + c3 + " ").replace("|\n", cr + "|\n")
653+
op = op.replace(": ", c5 + ":" + c3 + " ")
654+
op = op.replace("Debug Mode Commands", c5 + "Debug Mode Commands" + c3)
655+
op = op.replace(">>>", c4 + ">>>" + c3)
648656
print(op)
649657
line = 'For the full list of ' + c2 + 'command-line options' + cr
650658
line += ', type: "' + c3 + 'pytest' + cr + ' ' + c1 + '--help' + cr + '".'

0 commit comments

Comments
 (0)