Skip to content

Commit 851bccb

Browse files
committed
Update console output of "seleniumbase options"
1 parent 7e7df71 commit 851bccb

File tree

1 file changed

+47
-41
lines changed
  • seleniumbase/console_scripts

1 file changed

+47
-41
lines changed

seleniumbase/console_scripts/run.py

Lines changed: 47 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -571,48 +571,54 @@ def show_options():
571571
line = "Here are some common pytest options to use with SeleniumBase:"
572572
line = c1 + line + cr
573573
print(line)
574-
print("")
575-
print('--browser=BROWSER (The web browser to use. Default: "chrome".)')
576-
print('--headless (Run tests headlessly. Default mode on Linux OS.)')
577-
print('--demo (Slow down and visually see test actions as they occur.)')
578-
print('--slow (Slow down the automation. Faster than using Demo Mode.)')
579-
print('--reuse-session / --rs (Reuse browser session between tests.)')
580-
print('--crumbs (Delete all cookies between tests reusing a session.)')
581-
print('--maximize (Start tests with the web browser window maximized.)')
582-
print('--dashboard (Enable the SeleniumBase Dashboard at dashboard.html)')
583-
print("--incognito (Enable Chrome's Incognito mode.)")
584-
print("--guest (Enable Chrome's Guest mode.)")
585-
print('-m MARKER (Run tests with the specified pytest marker.)')
586-
print('-n NUM (Multithread the tests using that many threads.)')
587-
print('-v (Verbose mode. Prints the full names of each test run.)')
588-
print('--html=report.html (Create a detailed pytest-html report.)')
589-
print('--collect-only / --co (Only show discovered tests. No run.)')
590-
print('--co -q (Only show full names of discovered tests. No run.)')
591-
print('--trace (Enter Debug Mode immediately after starting any test.')
592-
print(' n: Next line of method. s: Step through. c: Continue.)')
593-
print('--pdb (Enter Debug Mode if a test fails. h: Help. c: Continue.')
594-
print(' where: Stacktrace location. u: Up stack. d: Down stack.')
595-
print(' longlist / ll: See code. dir(): List namespace objects.)')
596-
print('-x (Stop running the tests after the first failure is reached.)')
597-
print('--archive-logs (Archive old log files instead of deleting them.)')
598-
print('--save-screenshot (Save a screenshot at the end of each test.)')
599-
print('--check-js (Check for JavaScript errors after page loads.)')
600-
print('--start-page=URL (The browser start page when tests begin.)')
601-
print("--agent=STRING (Modify the web browser's User-Agent string.)")
602-
print('--mobile (Use the mobile device emulator while running tests.)')
603-
print('--metrics=STRING (Set mobile "CSSWidth,CSSHeight,PixelRatio".)')
604-
print('--ad-block (Block some types of display ads after page loads.)')
605-
print('--settings-file=FILE (Override default SeleniumBase settings.)')
606-
print('--env=ENV (Set the test env. Access with "self.env" in tests.)')
607-
print('--data=DATA (Extra test data. Access with "self.data" in tests.)')
608-
print('--disable-csp (Disable the Content Security Policy of websites.)')
609-
print('--server=SERVER (The Selenium Grid server/IP used for tests.)')
610-
print('--port=PORT (The Selenium Grid port used by the test server.)')
611-
print('--proxy=SERVER:PORT (Connect to a proxy server:port for tests.)')
612-
print('--proxy=USER:PASS@SERVER:PORT (Use authenticated proxy server.)')
613-
print("")
574+
line = '(Some options are Chromium-specific, e.g. "--guest --mobile")'
575+
print(line)
576+
op = "\n"
577+
op += '--browser=BROWSER (The web browser to use. Default: "chrome".)\n'
578+
op += '--headless (Run tests headlessly. Default mode on Linux OS.)\n'
579+
op += '--demo (Slow down and visually see test actions as they occur.)\n'
580+
op += '--slow (Slow down the automation. Faster than using Demo Mode.)\n'
581+
op += '--reuse-session / --rs (Reuse browser session between tests.)\n'
582+
op += '--crumbs (Delete all cookies between tests reusing a session.)\n'
583+
op += '--maximize (Start tests with the web browser window maximized.)\n'
584+
op += "--dashboard (Enable SeleniumBase's Dashboard at dashboard.html)\n"
585+
op += "--incognito (Enable Chromium's Incognito mode.)\n"
586+
op += "--guest (Enable Chromium's Guest mode.)\n"
587+
op += '-m=MARKER (Run tests with the specified pytest marker.)\n'
588+
op += '-n=NUM (Multithread the tests using that many threads.)\n'
589+
op += '-v (Verbose mode. Prints the full names of each test run.)\n'
590+
op += '--html=report.html (Create a detailed pytest-html report.)\n'
591+
op += '--collect-only / --co (Only show discovered tests. No run.)\n'
592+
op += '--co -q (Only show full names of discovered tests. No run.)\n'
593+
op += '--trace (Enter Debug Mode immediately after starting any test.\n'
594+
op += ' n: Next line of method. s: Step through. c: Continue.)\n'
595+
op += '--pdb (Enter Debug Mode if a test fails. h: Help. c: Continue.\n'
596+
op += ' where: Stacktrace location. u: Up stack. d: Down stack.\n'
597+
op += ' longlist / ll: See code. dir(): List namespace objects.)\n'
598+
op += '-x (Stop running the tests after the first failure is reached.)\n'
599+
op += '--archive-logs (Archive old log files instead of deleting them.)\n'
600+
op += '--save-screenshot (Save a screenshot at the end of each test.)\n'
601+
op += '--check-js (Check for JavaScript errors after page loads.)\n'
602+
op += '--start-page=URL (The browser start page when tests begin.)\n'
603+
op += "--agent=STRING (Modify the web browser's User-Agent string.)\n"
604+
op += "--mobile (Use Chromium's mobile device emulator during tests.)\n"
605+
op += '--metrics=STRING (Set mobile "CSSWidth,CSSHeight,PixelRatio".)\n'
606+
op += '--ad-block (Block some types of display ads after page loads.)\n'
607+
op += '--settings-file=FILE (Override default SeleniumBase settings.)\n'
608+
op += '--env=ENV (Set the test env. Access with "self.env" in tests.)\n'
609+
op += '--data=DATA (Extra test data. Access with "self.data" in tests.)\n'
610+
op += '--disable-csp (Disable the Content Security Policy of websites.)\n'
611+
op += '--server=SERVER (The Selenium Grid server/IP used for tests.)\n'
612+
op += '--port=PORT (The Selenium Grid port used by the test server.)\n'
613+
op += '--proxy=SERVER:PORT (Connect to a proxy server:port for tests.)\n'
614+
op += '--proxy=USER:PASS@SERVER:PORT (Use authenticated proxy server.)\n'
615+
op += cr
616+
op = op.replace("\n-", "\n" + c1 + "-").replace(' (', cr + ' (')
617+
op = op.replace(" / -", cr + " / " + c1 + "-")
618+
op = op.replace("=", c2 + "=" + c3)
619+
print(op)
614620
line = 'For the full list of ' + c2 + 'command-line options' + cr
615-
line += ', type: "' + c1 + 'pytest' + cr + ' ' + c3 + '--help' + cr + '".'
621+
line += ', type: "' + c3 + 'pytest' + cr + ' ' + c1 + '--help' + cr + '".'
616622
print(line)
617623
print("")
618624

0 commit comments

Comments
 (0)