seleniumbase 4.31.4__py3-none-any.whl → 4.31.6__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. seleniumbase/__init__.py +13 -6
  2. seleniumbase/__version__.py +1 -1
  3. seleniumbase/behave/behave_sb.py +0 -8
  4. seleniumbase/console_scripts/logo_helper.py +0 -8
  5. seleniumbase/console_scripts/run.py +344 -341
  6. seleniumbase/console_scripts/sb_behave_gui.py +0 -7
  7. seleniumbase/console_scripts/sb_caseplans.py +0 -7
  8. seleniumbase/console_scripts/sb_commander.py +0 -7
  9. seleniumbase/console_scripts/sb_install.py +47 -47
  10. seleniumbase/console_scripts/sb_mkchart.py +13 -20
  11. seleniumbase/console_scripts/sb_mkdir.py +9 -16
  12. seleniumbase/console_scripts/sb_mkfile.py +27 -34
  13. seleniumbase/console_scripts/sb_mkpres.py +13 -20
  14. seleniumbase/console_scripts/sb_mkrec.py +12 -19
  15. seleniumbase/console_scripts/sb_objectify.py +30 -30
  16. seleniumbase/console_scripts/sb_print.py +5 -12
  17. seleniumbase/console_scripts/sb_recorder.py +0 -7
  18. seleniumbase/fixtures/base_case.py +0 -4
  19. seleniumbase/fixtures/shared_utils.py +6 -0
  20. seleniumbase/plugins/pytest_plugin.py +0 -8
  21. seleniumbase/plugins/sb_manager.py +1 -6
  22. seleniumbase/translate/translator.py +0 -7
  23. {seleniumbase-4.31.4.dist-info → seleniumbase-4.31.6.dist-info}/METADATA +1 -1
  24. {seleniumbase-4.31.4.dist-info → seleniumbase-4.31.6.dist-info}/RECORD +28 -28
  25. {seleniumbase-4.31.4.dist-info → seleniumbase-4.31.6.dist-info}/LICENSE +0 -0
  26. {seleniumbase-4.31.4.dist-info → seleniumbase-4.31.6.dist-info}/WHEEL +0 -0
  27. {seleniumbase-4.31.4.dist-info → seleniumbase-4.31.6.dist-info}/entry_points.txt +0 -0
  28. {seleniumbase-4.31.4.dist-info → seleniumbase-4.31.6.dist-info}/top_level.txt +0 -0
@@ -41,90 +41,89 @@ sbase grid-node start --hub=127.0.0.1
41
41
  import colorama
42
42
  import sys
43
43
  import time
44
+ from contextlib import suppress
44
45
  from seleniumbase.config import settings
45
46
  from seleniumbase.fixtures import constants
46
47
  from seleniumbase.fixtures import shared_utils
47
48
 
48
- if shared_utils.is_windows() and hasattr(colorama, "just_fix_windows_console"):
49
- colorama.just_fix_windows_console()
50
- else:
51
- colorama.init(autoreset=True)
52
-
53
-
54
- def show_usage():
55
- show_basic_usage()
56
- sc = ""
57
- sc += ' Type "sbase help [COMMAND]" for specific info.\n'
58
- sc += ' For all commands, type: "seleniumbase --help".\n'
59
- sc += ' Use "pytest" for running tests.\n'
60
- if "linux" not in sys.platform:
61
- c1 = colorama.Fore.BLUE + colorama.Back.LIGHTCYAN_EX
62
- c2 = colorama.Fore.BLUE + colorama.Back.LIGHTGREEN_EX
63
- c3 = colorama.Fore.BLUE + colorama.Back.LIGHTYELLOW_EX
64
- c4 = colorama.Fore.MAGENTA + colorama.Back.LIGHTYELLOW_EX
65
- cr = colorama.Style.RESET_ALL
66
- sc = sc.replace("seleniumbase", c1 + "selenium" + c2 + "base" + cr)
67
- sc = sc.replace("sbase", c1 + "s" + c2 + "base" + cr)
68
- sc = sc.replace("pytest", c3 + "pytest" + cr)
69
- sc = sc.replace("--help", c4 + "--help" + cr)
70
- sc = sc.replace("help", c4 + "help" + cr)
71
- print(sc)
72
-
73
49
 
74
50
  def show_basic_usage():
75
51
  from seleniumbase.console_scripts import logo_helper
76
52
 
77
53
  seleniumbase_logo = logo_helper.get_seleniumbase_logo()
78
54
  print(seleniumbase_logo)
79
- time.sleep(0.044)
55
+ time.sleep(0.035)
80
56
  print("")
81
- time.sleep(0.033)
57
+ time.sleep(0.031)
82
58
  show_package_location()
83
- time.sleep(0.032)
59
+ time.sleep(0.031)
84
60
  show_version_info()
85
61
  time.sleep(0.031)
86
62
  print("")
87
- time.sleep(0.68) # Enough time to see the logo & version
63
+ time.sleep(0.555) # Enough time to see the logo & version
88
64
  sc = ""
89
- sc += ' * USAGE: "seleniumbase [COMMAND] [PARAMETERS]"\n'
90
- sc += ' * OR: "sbase [COMMAND] [PARAMETERS]"\n'
91
- sc += "\n"
92
- sc += "COMMANDS:\n"
93
- sc += " get / install [DRIVER] [OPTIONS]\n"
94
- sc += " methods (List common Python methods)\n"
95
- sc += " options (List common pytest options)\n"
96
- sc += " behave-options (List common behave options)\n"
97
- sc += " gui / commander [OPTIONAL PATH or TEST FILE]\n"
98
- sc += " behave-gui (SBase Commander for Behave)\n"
99
- sc += " caseplans [OPTIONAL PATH or TEST FILE]\n"
100
- sc += " mkdir [DIRECTORY] [OPTIONS]\n"
101
- sc += " mkfile [FILE.py] [OPTIONS]\n"
102
- sc += " mkrec / codegen [FILE.py] [OPTIONS]\n"
103
- sc += " recorder (Open Recorder Desktop App.)\n"
104
- sc += " record (If args: mkrec. Else: App.)\n"
105
- sc += " mkpres [FILE.py] [LANG]\n"
106
- sc += " mkchart [FILE.py] [LANG]\n"
107
- sc += " print [FILE] [OPTIONS]\n"
108
- sc += " translate [SB_FILE.py] [LANG] [ACTION]\n"
109
- sc += " convert [WEBDRIVER_UNITTEST_FILE.py]\n"
110
- sc += " extract-objects [SB_FILE.py]\n"
111
- sc += " inject-objects [SB_FILE.py] [OPTIONS]\n"
112
- sc += " objectify [SB_FILE.py] [OPTIONS]\n"
113
- sc += " revert-objects [SB_FILE.py] [OPTIONS]\n"
114
- sc += " encrypt / obfuscate\n"
115
- sc += " decrypt / unobfuscate\n"
116
- sc += " proxy (Start a basic proxy server)\n"
117
- sc += " download server (Get Selenium Grid JAR file)\n"
118
- sc += " grid-hub [start|stop] [OPTIONS]\n"
119
- sc += " grid-node [start|stop] --hub=[HOST/IP]\n"
120
- sc += ' * (EXAMPLE: "sbase get chromedriver") *\n'
65
+ sc += "╭──────────────────────────────────────────────────╮\n"
66
+ sc += '│ * USAGE: "seleniumbase [COMMAND] [PARAMETERS]" │\n'
67
+ sc += '│ * OR: "sbase [COMMAND] [PARAMETERS]" │\n'
68
+ sc += "│ │\n"
69
+ sc += " COMMANDS: PARAMETERS / DESCRIPTIONS: │\n"
70
+ sc += "│ get / install [DRIVER_NAME] [OPTIONS] │\n"
71
+ sc += "│ methods (List common Python methods) │\n"
72
+ sc += "options (List common pytest options) │\n"
73
+ sc += "│ behave-options (List common behave options) │\n"
74
+ sc += "gui / commander [OPTIONAL PATH or TEST FILE] │\n"
75
+ sc += "│ behave-gui (SBase Commander for Behave) │\n"
76
+ sc += "│ caseplans [OPTIONAL PATH or TEST FILE] │\n"
77
+ sc += "│ mkdir [DIRECTORY] [OPTIONS] │\n"
78
+ sc += "│ mkfile [FILE.py] [OPTIONS] │\n"
79
+ sc += "│ mkrec / codegen [FILE.py] [OPTIONS] │\n"
80
+ sc += "│ recorder (Open Recorder Desktop App.) │\n"
81
+ sc += "│ record (If args: mkrec. Else: App.) │\n"
82
+ sc += "│ mkpres [FILE.py] [LANG] │\n"
83
+ sc += "│ mkchart [FILE.py] [LANG] │\n"
84
+ sc += "│ print [FILE] [OPTIONS] │\n"
85
+ sc += "│ translate [SB_FILE.py] [LANG] [ACTION] │\n"
86
+ sc += "│ convert [WEBDRIVER_UNITTEST_FILE.py] │\n"
87
+ sc += "│ extract-objects [SB_FILE.py] │\n"
88
+ sc += "│ inject-objects [SB_FILE.py] [OPTIONS] │\n"
89
+ sc += "│ objectify [SB_FILE.py] [OPTIONS] │\n"
90
+ sc += "│ revert-objects [SB_FILE.py] [OPTIONS] │\n"
91
+ sc += "│ encrypt / obfuscate │\n"
92
+ sc += "│ decrypt / unobfuscate │\n"
93
+ sc += "│ proxy (Start a basic proxy server) │\n"
94
+ sc += "│ download server (Get Selenium Grid JAR file) │\n"
95
+ sc += "grid-hub [start|stop] [OPTIONS] │\n"
96
+ sc += "│ grid-node [start|stop] --hub=[HOST/IP] │\n"
97
+ sc += "│ │\n"
98
+ sc += '│ * EXAMPLE => "sbase get chromedriver stable" │\n'
99
+ sc += '│ * For command info => "sbase help [COMMAND]" │\n'
100
+ sc += '│ * For info on all commands => "sbase --help" │\n'
101
+ sc += "╰──────────────────────────────────────────────────╯"
121
102
  sc += ""
103
+ bordered_sc = sc
122
104
  if "linux" not in sys.platform:
123
105
  c1 = colorama.Fore.BLUE + colorama.Back.LIGHTCYAN_EX
124
106
  c2 = colorama.Fore.BLUE + colorama.Back.LIGHTGREEN_EX
107
+ c3 = colorama.Fore.BLUE + colorama.Back.LIGHTYELLOW_EX
108
+ c4 = colorama.Fore.MAGENTA + colorama.Back.LIGHTYELLOW_EX
125
109
  cr = colorama.Style.RESET_ALL
126
110
  sc = sc.replace("seleniumbase", c1 + "selenium" + c2 + "base" + cr)
127
111
  sc = sc.replace("sbase", c1 + "s" + c2 + "base" + cr)
112
+ sc = sc.replace("[COMMAND]", c3 + "[COMMAND]" + cr)
113
+ sc = sc.replace("--help", c4 + "--help" + cr)
114
+ sc = sc.replace("help", c4 + "help" + cr)
115
+ with suppress(Exception):
116
+ print(sc)
117
+ return
118
+ sc = bordered_sc.replace("╮\n", "")
119
+ sc = sc.replace("╭", "").replace("╮", "").replace("│", "")
120
+ sc = sc.replace("╰", "").replace("╯", "").replace("─", "")
121
+ if "linux" not in sys.platform:
122
+ sc = sc.replace("seleniumbase", c1 + "selenium" + c2 + "base" + cr)
123
+ sc = sc.replace("sbase", c1 + "s" + c2 + "base" + cr)
124
+ sc = sc.replace("[COMMAND]", c3 + "[COMMAND]" + cr)
125
+ sc = sc.replace("--help", c4 + "--help" + cr)
126
+ sc = sc.replace("help", c4 + "help" + cr)
128
127
  print(sc)
129
128
 
130
129
 
@@ -136,33 +135,33 @@ def show_install_usage():
136
135
  print(sc)
137
136
  print("")
138
137
  print(" Usage:")
139
- print(" seleniumbase install [DRIVER_NAME] [OPTIONS]")
140
- print(" OR: seleniumbase get [DRIVER_NAME] [OPTIONS]")
141
- print(" OR: sbase install [DRIVER_NAME] [OPTIONS]")
142
- print(" OR: sbase get [DRIVER_NAME] [OPTIONS]")
143
- print(" (Drivers: chromedriver, geckodriver, edgedriver")
144
- print(" iedriver, uc_driver)")
138
+ print(" seleniumbase install [DRIVER_NAME] [OPTIONS]")
139
+ print(" OR: seleniumbase get [DRIVER_NAME] [OPTIONS]")
140
+ print(" OR: sbase install [DRIVER_NAME] [OPTIONS]")
141
+ print(" OR: sbase get [DRIVER_NAME] [OPTIONS]")
142
+ print(" (Drivers: chromedriver, geckodriver,")
143
+ print(" edgedriver, iedriver, uc_driver)")
145
144
  print(" Options:")
146
- print(" VERSION Specify the version to download.")
147
- print(" Tries to detect the needed version.")
148
- print(" If using chromedriver or edgedriver,")
149
- print(" you can use the major version integer.")
145
+ print(" VERSION Specify the version to download.")
146
+ print(" Tries to detect the needed version.")
147
+ print(" If using chromedriver or edgedriver,")
148
+ print(" you can use the major version integer.")
150
149
  print()
151
- print(" -p OR --path Also copy the driver to /usr/local/bin")
150
+ print(" -p / --path Also copy driver to /usr/local/bin")
152
151
  print(" Examples:")
153
- print(" sbase get chromedriver")
154
- print(" sbase get geckodriver")
155
- print(" sbase get edgedriver")
156
- print(" sbase get chromedriver 114")
157
- print(" sbase get chromedriver 114.0.5735.90")
158
- print(" sbase get chromedriver stable")
159
- print(" sbase get chromedriver beta")
160
- print(" sbase get chromedriver -p")
152
+ print(" sbase get chromedriver")
153
+ print(" sbase get geckodriver")
154
+ print(" sbase get edgedriver")
155
+ print(" sbase get chromedriver 114")
156
+ print(" sbase get chromedriver 114.0.5735.90")
157
+ print(" sbase get chromedriver stable")
158
+ print(" sbase get chromedriver beta")
159
+ print(" sbase get chromedriver -p")
161
160
  print(" Output:")
162
- print(" Downloads the webdriver to seleniumbase/drivers/")
163
- print(" (chromedriver is required for Chrome automation)")
164
- print(" (geckodriver is required for Firefox automation)")
165
- print(" (edgedriver is required for MS__Edge automation)")
161
+ print(" Downloads the webdriver to seleniumbase/drivers/")
162
+ print(" (chromedriver is required for Chrome automation)")
163
+ print(" (geckodriver is required for Firefox automation)")
164
+ print(" (edgedriver is required for MS__Edge automation)")
166
165
  print("")
167
166
 
168
167
 
@@ -174,18 +173,18 @@ def show_commander_usage():
174
173
  print(sc)
175
174
  print("")
176
175
  print(" Usage:")
177
- print(" seleniumbase commander [OPTIONAL PATH or TEST FILE]")
178
- print(" OR: sbase commander [OPTIONAL PATH or TEST FILE]")
179
- print(" OR: seleniumbase gui [OPTIONAL PATH or TEST FILE]")
180
- print(" OR: sbase gui [OPTIONAL PATH or TEST FILE]")
176
+ print(" seleniumbase commander [OPTIONAL PATH or TEST FILE]")
177
+ print(" OR: sbase commander [OPTIONAL PATH or TEST FILE]")
178
+ print(" OR: seleniumbase gui [OPTIONAL PATH or TEST FILE]")
179
+ print(" OR: sbase gui [OPTIONAL PATH or TEST FILE]")
181
180
  print(" Examples:")
182
- print(" sbase gui")
183
- print(" sbase gui -k agent")
184
- print(" sbase gui -m marker2")
185
- print(" sbase gui test_suite.py")
186
- print(" sbase gui offline_examples/")
181
+ print(" sbase gui")
182
+ print(" sbase gui -k agent")
183
+ print(" sbase gui -m marker2")
184
+ print(" sbase gui test_suite.py")
185
+ print(" sbase gui offline_examples/")
187
186
  print(" Output:")
188
- print(" Launches SeleniumBase Commander | GUI for pytest.")
187
+ print(" Launches SeleniumBase Commander | GUI for pytest.")
189
188
  print("")
190
189
 
191
190
 
@@ -197,16 +196,16 @@ def show_behave_gui_usage():
197
196
  print(sc)
198
197
  print("")
199
198
  print(" Usage:")
200
- print(" seleniumbase behave-gui [OPTIONAL PATH or TEST FILE]")
201
- print(" seleniumbase gui-behave [OPTIONAL PATH or TEST FILE]")
202
- print(" OR: sbase behave-gui [OPTIONAL PATH or TEST FILE]")
203
- print(" OR: sbase gui-behave [OPTIONAL PATH or TEST FILE]")
199
+ print(" seleniumbase behave-gui [OPTIONAL PATH or TEST FILE]")
200
+ print(" seleniumbase gui-behave [OPTIONAL PATH or TEST FILE]")
201
+ print(" OR: sbase behave-gui [OPTIONAL PATH or TEST FILE]")
202
+ print(" OR: sbase gui-behave [OPTIONAL PATH or TEST FILE]")
204
203
  print(" Examples:")
205
- print(" sbase behave-gui")
206
- print(" sbase behave-gui features/")
207
- print(" sbase behave-gui features/calculator.feature")
204
+ print(" sbase behave-gui")
205
+ print(" sbase behave-gui features/")
206
+ print(" sbase behave-gui features/calculator.feature")
208
207
  print(" Output:")
209
- print(" Launches SeleniumBase Commander | GUI for Behave.")
208
+ print(" Launches SeleniumBase Commander | GUI for Behave.")
210
209
  print("")
211
210
 
212
211
 
@@ -218,16 +217,16 @@ def show_caseplans_usage():
218
217
  print(sc)
219
218
  print("")
220
219
  print(" Usage:")
221
- print(" seleniumbase caseplans [OPTIONAL PATH or TEST FILE]")
222
- print(" OR: sbase caseplans [OPTIONAL PATH or TEST FILE]")
220
+ print(" seleniumbase caseplans [OPTIONAL PATH or TEST FILE]")
221
+ print(" OR: sbase caseplans [OPTIONAL PATH or TEST FILE]")
223
222
  print(" Examples:")
224
- print(" sbase caseplans")
225
- print(" sbase caseplans -k agent")
226
- print(" sbase caseplans -m marker2")
227
- print(" sbase caseplans test_suite.py")
228
- print(" sbase caseplans offline_examples/")
223
+ print(" sbase caseplans")
224
+ print(" sbase caseplans -k agent")
225
+ print(" sbase caseplans -m marker2")
226
+ print(" sbase caseplans test_suite.py")
227
+ print(" sbase caseplans offline_examples/")
229
228
  print(" Output:")
230
- print(" Launches the SeleniumBase Case Plans Generator.")
229
+ print(" Launches the SeleniumBase Case Plans Generator.")
231
230
  print("")
232
231
 
233
232
 
@@ -239,18 +238,18 @@ def show_mkdir_usage():
239
238
  print(sc)
240
239
  print("")
241
240
  print(" Usage:")
242
- print(" seleniumbase mkdir [DIRECTORY] [OPTIONS]")
243
- print(" OR: sbase mkdir [DIRECTORY] [OPTIONS]")
241
+ print(" seleniumbase mkdir [DIRECTORY] [OPTIONS]")
242
+ print(" OR: sbase mkdir [DIRECTORY] [OPTIONS]")
244
243
  print(" Example:")
245
- print(" sbase mkdir ui_tests")
244
+ print(" sbase mkdir ui_tests")
246
245
  print(" Options:")
247
- print(" -b / --basic (Only config files. No tests added.)")
246
+ print(" -b / --basic (Only config files. No tests added.)")
248
247
  print(" Output:")
249
- print(" Creates a new folder for running SBase scripts.")
250
- print(" The new folder contains default config files,")
251
- print(" sample tests for helping new users get started,")
252
- print(" and Python boilerplates for setting up customized")
253
- print(" test frameworks.")
248
+ print(" Creates a new folder for running SBase scripts.")
249
+ print(" The new folder contains default config files,")
250
+ print(" sample tests for helping new users get started,")
251
+ print(" and Python boilerplates for setting up customized")
252
+ print(" test frameworks.")
254
253
  print("")
255
254
 
256
255
 
@@ -262,38 +261,38 @@ def show_mkfile_usage():
262
261
  print(sc)
263
262
  print("")
264
263
  print(" Usage:")
265
- print(" seleniumbase mkfile [FILE.py] [OPTIONS]")
266
- print(" OR: sbase mkfile [FILE.py] [OPTIONS]")
264
+ print(" seleniumbase mkfile [FILE.py] [OPTIONS]")
265
+ print(" OR: sbase mkfile [FILE.py] [OPTIONS]")
267
266
  print(" Example:")
268
- print(" sbase mkfile new_test.py")
267
+ print(" sbase mkfile new_test.py")
269
268
  print(" Options:")
270
- print(" --uc (UC Mode boilerplate using SB context manager)")
271
- print(" -b / --basic (Basic boilerplate / single-line test)")
272
- print(" -r / --rec (Adds Pdb+ breakpoint for Recorder Mode)")
273
- print(" --url=URL (Makes the test start on a specific page)")
269
+ print(" --uc (UC Mode boilerplate using SB context manager)")
270
+ print(" -b / --basic (Basic boilerplate / single-line test)")
271
+ print(" -r / --rec (Adds Pdb+ breakpoint for Recorder Mode)")
272
+ print(" --url=URL (Makes the test start on a specific page)")
274
273
  print(" Language Options:")
275
- print(" --en / --English | --zh / --Chinese")
276
- print(" --nl / --Dutch | --fr / --French")
277
- print(" --it / --Italian | --ja / --Japanese")
278
- print(" --ko / --Korean | --pt / --Portuguese")
279
- print(" --ru / --Russian | --es / --Spanish")
274
+ print(" --en / --English | --zh / --Chinese")
275
+ print(" --nl / --Dutch | --fr / --French")
276
+ print(" --it / --Italian | --ja / --Japanese")
277
+ print(" --ko / --Korean | --pt / --Portuguese")
278
+ print(" --ru / --Russian | --es / --Spanish")
280
279
  print(" Syntax Formats:")
281
- print(" --bc / --basecase (BaseCase class inheritance)")
282
- print(" --pf / --pytest-fixture (sb pytest fixture)")
283
- print(" --cf / --class-fixture (class + sb pytest fixture)")
284
- print(" --cm / --context-manager (SB context manager)")
285
- print(" --dc / --driver-context (DriverContext manager)")
286
- print(" --dm / --driver-manager (Driver manager)")
280
+ print(" --bc / --basecase (BaseCase class inheritance)")
281
+ print(" --pf / --pytest-fixture (sb pytest fixture)")
282
+ print(" --cf / --class-fixture (class + sb pytest fixture)")
283
+ print(" --cm / --context-manager (SB context manager)")
284
+ print(" --dc / --driver-context (DriverContext manager)")
285
+ print(" --dm / --driver-manager (Driver manager)")
287
286
  print(" Output:")
288
- print(" Creates a new SBase test file with boilerplate code.")
289
- print(" If the file already exists, an error is raised.")
290
- print(" By default, uses English with BaseCase inheritance,")
291
- print(" and creates a boilerplate with common SeleniumBase")
292
- print(' methods: "open", "type", "click", "assert_element",')
293
- print(' and "assert_text". If using the basic boilerplate')
294
- print(' option, only the "open" method is included. Only the')
295
- print(" BaseCase format supports Languages or Recorder Mode.")
296
- print(" UC Mode automatically uses English with SB() format.")
287
+ print(" Creates a new SBase test file with boilerplate code.")
288
+ print(" If the file already exists, an error is raised.")
289
+ print(" By default, uses English with BaseCase inheritance,")
290
+ print(" and creates a boilerplate with common SeleniumBase")
291
+ print(' methods: "open", "type", "click", "assert_element",')
292
+ print(' and "assert_text". If using the basic boilerplate')
293
+ print(' option, only the "open" method is included. Only the')
294
+ print(" BaseCase format supports Languages or Recorder Mode.")
295
+ print(" UC Mode automatically uses English with SB() format.")
297
296
  print("")
298
297
 
299
298
 
@@ -305,22 +304,22 @@ def show_mkrec_usage():
305
304
  print(sc)
306
305
  print("")
307
306
  print(" Usage:")
308
- print(" seleniumbase mkrec [FILE.py] [OPTIONS]")
309
- print(" OR: sbase mkrec [FILE.py] [OPTIONS]")
307
+ print(" seleniumbase mkrec [FILE.py] [OPTIONS]")
308
+ print(" OR: sbase mkrec [FILE.py] [OPTIONS]")
310
309
  print(" Examples:")
311
- print(" sbase mkrec new_test.py")
312
- print(" sbase mkrec new_test.py --url=wikipedia.org")
310
+ print(" sbase mkrec new_test.py")
311
+ print(" sbase mkrec new_test.py --url=wikipedia.org")
313
312
  print(" Options:")
314
- print(" --url=URL (Sets the initial start page URL.)")
315
- print(" --edge (Use Edge browser instead of Chrome.)")
316
- print(" --gui / --headed (Use headed mode on Linux.)")
317
- print(" --uc / --undetected (Use undetectable mode.)")
318
- print(" --ee (Use SHIFT + ESC to end the recording.)")
319
- print(" --overwrite (Overwrite file when it exists.)")
320
- print(" --behave (Also output Behave/Gherkin files.)")
313
+ print(" --url=URL (Sets the initial start page URL.)")
314
+ print(" --edge (Use Edge browser instead of Chrome.)")
315
+ print(" --gui / --headed (Use headed mode on Linux.)")
316
+ print(" --uc / --undetected (Use undetectable mode.)")
317
+ print(" --ee (Use SHIFT + ESC to end the recording.)")
318
+ print(" --overwrite (Overwrite file when it exists.)")
319
+ print(" --behave (Also output Behave/Gherkin files.)")
321
320
  print(" Output:")
322
- print(" Creates a new SeleniumBase test using the Recorder.")
323
- print(" If the filename already exists, an error is raised.")
321
+ print(" Creates a new SeleniumBase test using the Recorder.")
322
+ print(" If the filename already exists, an error is raised.")
324
323
  print("")
325
324
 
326
325
 
@@ -332,22 +331,22 @@ def show_codegen_usage():
332
331
  print(sc)
333
332
  print("")
334
333
  print(" Usage:")
335
- print(" seleniumbase codegen [FILE.py] [OPTIONS]")
336
- print(" OR: sbase codegen [FILE.py] [OPTIONS]")
334
+ print(" seleniumbase codegen [FILE.py] [OPTIONS]")
335
+ print(" OR: sbase codegen [FILE.py] [OPTIONS]")
337
336
  print(" Examples:")
338
- print(" sbase codegen new_test.py")
339
- print(" sbase codegen new_test.py --url=wikipedia.org")
337
+ print(" sbase codegen new_test.py")
338
+ print(" sbase codegen new_test.py --url=wikipedia.org")
340
339
  print(" Options:")
341
- print(" --url=URL (Sets the initial start page URL.)")
342
- print(" --edge (Use Edge browser instead of Chrome.)")
343
- print(" --gui / --headed (Use headed mode on Linux.)")
344
- print(" --uc / --undetected (Use undetectable mode.)")
345
- print(" --ee (Use SHIFT + ESC to end the recording.)")
346
- print(" --overwrite (Overwrite file when it exists.)")
347
- print(" --behave (Also output Behave/Gherkin files.)")
340
+ print(" --url=URL (Sets the initial start page URL.)")
341
+ print(" --edge (Use Edge browser instead of Chrome.)")
342
+ print(" --gui / --headed (Use headed mode on Linux.)")
343
+ print(" --uc / --undetected (Use undetectable mode.)")
344
+ print(" --ee (Use SHIFT + ESC to end the recording.)")
345
+ print(" --overwrite (Overwrite file when it exists.)")
346
+ print(" --behave (Also output Behave/Gherkin files.)")
348
347
  print(" Output:")
349
- print(" Creates a new SeleniumBase test using the Recorder.")
350
- print(" If the filename already exists, an error is raised.")
348
+ print(" Creates a new SeleniumBase test using the Recorder.")
349
+ print(" If the filename already exists, an error is raised.")
351
350
  print("")
352
351
 
353
352
 
@@ -359,13 +358,13 @@ def show_recorder_usage():
359
358
  print(sc)
360
359
  print("")
361
360
  print(" Usage:")
362
- print(" seleniumbase recorder [OPTIONS]")
363
- print(" OR: sbase recorder [OPTIONS]")
361
+ print(" seleniumbase recorder [OPTIONS]")
362
+ print(" OR: sbase recorder [OPTIONS]")
364
363
  print(" Options:")
365
- print(" --uc / --undetected (Use undetectable mode.)")
366
- print(" --behave (Also output Behave/Gherkin files.)")
364
+ print(" --uc / --undetected (Use undetectable mode.)")
365
+ print(" --behave (Also output Behave/Gherkin files.)")
367
366
  print(" Output:")
368
- print(" Launches the SeleniumBase Recorder Desktop App.")
367
+ print(" Launches the SeleniumBase Recorder Desktop App.")
369
368
  print("")
370
369
 
371
370
 
@@ -377,22 +376,22 @@ def show_mkpres_usage():
377
376
  print(sc)
378
377
  print("")
379
378
  print(" Usage:")
380
- print(" seleniumbase mkpres [FILE.py] [LANG]")
381
- print(" OR: sbase mkpres [FILE.py] [LANG]")
379
+ print(" seleniumbase mkpres [FILE.py] [LANG]")
380
+ print(" OR: sbase mkpres [FILE.py] [LANG]")
382
381
  print(" Example:")
383
- print(" sbase mkpres new_presentation.py --en")
382
+ print(" sbase mkpres new_presentation.py --en")
384
383
  print(" Language Options:")
385
- print(" --en / --English | --zh / --Chinese")
386
- print(" --nl / --Dutch | --fr / --French")
387
- print(" --it / --Italian | --ja / --Japanese")
388
- print(" --ko / --Korean | --pt / --Portuguese")
389
- print(" --ru / --Russian | --es / --Spanish")
384
+ print(" --en / --English | --zh / --Chinese")
385
+ print(" --nl / --Dutch | --fr / --French")
386
+ print(" --it / --Italian | --ja / --Japanese")
387
+ print(" --ko / --Korean | --pt / --Portuguese")
388
+ print(" --ru / --Russian | --es / --Spanish")
390
389
  print(" Output:")
391
- print(" Creates a new presentation with 3 example slides.")
392
- print(" If the file already exists, an error is raised.")
393
- print(" By default, the slides are written in English,")
394
- print(' and use "serif" theme with "slide" transition.')
395
- print(" The slides can be used as a basic boilerplate.")
390
+ print(" Creates a new presentation with 3 example slides.")
391
+ print(" If the file already exists, an error is raised.")
392
+ print(" By default, the slides are written in English,")
393
+ print(' and use "serif" theme with "slide" transition.')
394
+ print(" The slides can be used as a basic boilerplate.")
396
395
  print("")
397
396
 
398
397
 
@@ -404,22 +403,22 @@ def show_mkchart_usage():
404
403
  print(sc)
405
404
  print("")
406
405
  print(" Usage:")
407
- print(" seleniumbase mkchart [FILE.py] [LANG]")
408
- print(" OR: sbase mkchart [FILE.py] [LANG]")
406
+ print(" seleniumbase mkchart [FILE.py] [LANG]")
407
+ print(" OR: sbase mkchart [FILE.py] [LANG]")
409
408
  print(" Example:")
410
- print(" sbase mkchart new_chart.py --en")
409
+ print(" sbase mkchart new_chart.py --en")
411
410
  print(" Language Options:")
412
- print(" --en / --English | --zh / --Chinese")
413
- print(" --nl / --Dutch | --fr / --French")
414
- print(" --it / --Italian | --ja / --Japanese")
415
- print(" --ko / --Korean | --pt / --Portuguese")
416
- print(" --ru / --Russian | --es / --Spanish")
411
+ print(" --en / --English | --zh / --Chinese")
412
+ print(" --nl / --Dutch | --fr / --French")
413
+ print(" --it / --Italian | --ja / --Japanese")
414
+ print(" --ko / --Korean | --pt / --Portuguese")
415
+ print(" --ru / --Russian | --es / --Spanish")
417
416
  print(" Output:")
418
- print(" Creates a new SeleniumBase chart presentation.")
419
- print(" If the file already exists, an error is raised.")
420
- print(" By default, the slides are written in English,")
421
- print(' and use a "sky" theme with "slide" transition.')
422
- print(" The chart can be used as a basic boilerplate.")
417
+ print(" Creates a new SeleniumBase chart presentation.")
418
+ print(" If the file already exists, an error is raised.")
419
+ print(" By default, the slides are written in English,")
420
+ print(' and use a "sky" theme with "slide" transition.')
421
+ print(" The chart can be used as a basic boilerplate.")
423
422
  print("")
424
423
 
425
424
 
@@ -431,13 +430,13 @@ def show_convert_usage():
431
430
  print(sc)
432
431
  print("")
433
432
  print(" Usage:")
434
- print(" seleniumbase convert [WEBDRIVER_UNITTEST_FILE.py]")
435
- print(" OR: sbase convert [WEBDRIVER_UNITTEST_FILE.py]")
433
+ print(" seleniumbase convert [WEBDRIVER_UNITTEST_FILE.py]")
434
+ print(" OR: sbase convert [WEBDRIVER_UNITTEST_FILE.py]")
436
435
  print(" Output:")
437
- print(" Converts a Selenium IDE exported WebDriver unittest")
438
- print(" file into a SeleniumBase file. Adds _SB to the new")
439
- print(" file name while keeping the original file intact.")
440
- print(" (Works with Katalon Recorder Selenium scripts.)")
436
+ print(" Converts a Selenium IDE exported WebDriver unittest")
437
+ print(" file into a SeleniumBase file. Adds _SB to the new")
438
+ print(" file name while keeping the original file intact.")
439
+ print(" (Works with Katalon Recorder Selenium scripts.)")
441
440
  print("")
442
441
 
443
442
 
@@ -449,13 +448,13 @@ def show_print_usage():
449
448
  print(sc)
450
449
  print("")
451
450
  print(" Usage:")
452
- print(" seleniumbase print [FILE] [OPTIONS]")
453
- print(" OR: sbase print [FILE] [OPTIONS]")
451
+ print(" seleniumbase print [FILE] [OPTIONS]")
452
+ print(" OR: sbase print [FILE] [OPTIONS]")
454
453
  print(" Options:")
455
- print(" -n (Add line Numbers to the rows)")
454
+ print(" -n (Add line Numbers to the rows)")
456
455
  print(" Output:")
457
- print(" Prints the code/text of any file")
458
- print(" with syntax-highlighting.")
456
+ print(" Prints the code/text of any file")
457
+ print(" with syntax-highlighting.")
459
458
  print("")
460
459
 
461
460
 
@@ -467,30 +466,30 @@ def show_translate_usage():
467
466
  print(sc)
468
467
  print("")
469
468
  print(" Usage:")
470
- print(" seleniumbase translate [SB_FILE.py] [LANG] [ACTION]")
471
- print(" OR: sbase translate [SB_FILE.py] [LANG] [ACTION]")
469
+ print(" seleniumbase translate [SB_FILE.py] [LANG] [ACTION]")
470
+ print(" OR: sbase translate [SB_FILE.py] [LANG] [ACTION]")
472
471
  print(" Languages:")
473
- print(" --en / --English | --zh / --Chinese")
474
- print(" --nl / --Dutch | --fr / --French")
475
- print(" --it / --Italian | --ja / --Japanese")
476
- print(" --ko / --Korean | --pt / --Portuguese")
477
- print(" --ru / --Russian | --es / --Spanish")
472
+ print(" --en / --English | --zh / --Chinese")
473
+ print(" --nl / --Dutch | --fr / --French")
474
+ print(" --it / --Italian | --ja / --Japanese")
475
+ print(" --ko / --Korean | --pt / --Portuguese")
476
+ print(" --ru / --Russian | --es / --Spanish")
478
477
  print(" Actions:")
479
- print(" -p / --print (Print translation output to the screen)")
480
- print(" -o / --overwrite (Overwrite the file being translated)")
481
- print(" -c / --copy (Copy the translation to a new .py file)")
478
+ print(" -p / --print (Print translation output to the screen)")
479
+ print(" -o / --overwrite (Overwrite the file being translated)")
480
+ print(" -c / --copy (Copy the translation to a new .py file)")
482
481
  print(" Options:")
483
- print(" -n (include line Numbers when using the Print action)")
482
+ print(" -n (include line Numbers when using the Print action)")
484
483
  print(" Output:")
485
- print(" Translates a SeleniumBase Python file into the language")
486
- print(' specified. Method calls and "import" lines get swapped.')
487
- print(" Both a language and an action must be specified.")
488
- print(' The "-p" action can be paired with one other action.')
489
- print(' When running with "-c" (or "--copy"), the new file name')
490
- print(" will be the original name appended with an underscore")
491
- print(" plus the 2-letter language code of the new language.")
492
- print(' (Example: Translating "test_1.py" into Japanese with')
493
- print(' "-c" will create a new file called "test_1_ja.py".)')
484
+ print(" Translates a SeleniumBase Python file into the language")
485
+ print(' specified. Method calls and "import" lines get swapped.')
486
+ print(" Both a language and an action must be specified.")
487
+ print(' The "-p" action can be paired with one other action.')
488
+ print(' When running with "-c" (or "--copy"), the new file name')
489
+ print(" will be the original name appended with an underscore")
490
+ print(" plus the 2-letter language code of the new language.")
491
+ print(' (Example: Translating "test_1.py" into Japanese with')
492
+ print(' "-c" will create a new file called "test_1_ja.py".)')
494
493
  print("")
495
494
 
496
495
 
@@ -502,12 +501,12 @@ def show_extract_objects_usage():
502
501
  print(sc)
503
502
  print("")
504
503
  print(" Usage:")
505
- print(" seleniumbase extract-objects [SB_FILE.py]")
506
- print(" OR: sbase extract-objects [SB_FILE.py]")
504
+ print(" seleniumbase extract-objects [SB_FILE.py]")
505
+ print(" OR: sbase extract-objects [SB_FILE.py]")
507
506
  print(" Output:")
508
- print(" Creates page objects based on selectors found in a")
509
- print(" seleniumbase Python file and saves those objects to the")
510
- print(' "page_objects.py" file in the same folder as the tests.')
507
+ print(" Creates page objects based on selectors found in a")
508
+ print(" seleniumbase Python file and saves those objects to the")
509
+ print(' "page_objects.py" file in the same folder as the tests.')
511
510
  print("")
512
511
 
513
512
 
@@ -519,15 +518,15 @@ def show_inject_objects_usage():
519
518
  print(sc)
520
519
  print("")
521
520
  print(" Usage:")
522
- print(" seleniumbase inject-objects [SB_FILE.py] [OPTIONS]")
523
- print(" OR: sbase inject-objects [SB_FILE.py] [OPTIONS]")
521
+ print(" seleniumbase inject-objects [SB_FILE.py] [OPTIONS]")
522
+ print(" OR: sbase inject-objects [SB_FILE.py] [OPTIONS]")
524
523
  print(" Options:")
525
- print(" -c, --comments (Add object selectors to the comments.)")
526
- print(" (Default: No added comments.)")
524
+ print(" -c, --comments (Add object selectors to the comments.)")
525
+ print(" (Default: No added comments.)")
527
526
  print(" Output:")
528
- print(' Takes the page objects found in the "page_objects.py"')
529
- print(" file and uses those to replace matching selectors in")
530
- print(" the selected seleniumbase Python file.")
527
+ print(' Takes the page objects found in the "page_objects.py"')
528
+ print(" file and uses those to replace matching selectors in")
529
+ print(" the selected seleniumbase Python file.")
531
530
  print("")
532
531
 
533
532
 
@@ -539,18 +538,18 @@ def show_objectify_usage():
539
538
  print(sc)
540
539
  print("")
541
540
  print(" Usage:")
542
- print(" seleniumbase objectify [SB_FILE.py] [OPTIONS]")
543
- print(" OR: sbase objectify [SB_FILE.py] [OPTIONS]")
541
+ print(" seleniumbase objectify [SB_FILE.py] [OPTIONS]")
542
+ print(" OR: sbase objectify [SB_FILE.py] [OPTIONS]")
544
543
  print(" Options:")
545
- print(" -c, --comments (Add object selectors to the comments.)")
546
- print(" (Default: No added comments.)")
544
+ print(" -c, --comments (Add object selectors to the comments.)")
545
+ print(" (Default: No added comments.)")
547
546
  print(" Output:")
548
- print(" A modified version of the file where the selectors")
549
- print(" have been replaced with variable names defined in")
550
- print(' "page_objects.py", supporting the Page Object Pattern.')
547
+ print(" A modified version of the file where the selectors")
548
+ print(" have been replaced with variable names defined in")
549
+ print(' "page_objects.py", supporting the Page Object Pattern.')
551
550
  print("")
552
- print(' (seleniumbase "objectify" has the same outcome as')
553
- print(' combining "extract-objects" with "inject-objects")')
551
+ print(' (seleniumbase "objectify" has the same outcome as')
552
+ print(' combining "extract-objects" with "inject-objects")')
554
553
  print("")
555
554
 
556
555
 
@@ -562,16 +561,16 @@ def show_revert_objects_usage():
562
561
  print(sc)
563
562
  print("")
564
563
  print(" Usage:")
565
- print(" seleniumbase revert-objects [SB_FILE.py] [OPTIONS]")
566
- print(" OR: sbase revert-objects [SB_FILE.py] [OPTIONS]")
564
+ print(" seleniumbase revert-objects [SB_FILE.py] [OPTIONS]")
565
+ print(" OR: sbase revert-objects [SB_FILE.py] [OPTIONS]")
567
566
  print(" Options:")
568
- print(" -c, --comments (Keep existing comments for the lines.)")
569
- print(" (Default: No comments are kept.)")
567
+ print(" -c, --comments (Keep existing comments for the lines.)")
568
+ print(" (Default: No comments are kept.)")
570
569
  print(" Output:")
571
- print(' Reverts the changes made by "seleniumbase objectify" or')
572
- print(' "seleniumbase inject-objects" when run against a')
573
- print(" seleniumbase Python file. Objects will get replaced by")
574
- print(' selectors stored in the "page_objects.py" file.')
570
+ print(' Reverts the changes made by "seleniumbase objectify" or')
571
+ print(' "seleniumbase inject-objects" when run against a')
572
+ print(" seleniumbase Python file. Objects will get replaced by")
573
+ print(' selectors stored in the "page_objects.py" file.')
575
574
  print("")
576
575
 
577
576
 
@@ -583,12 +582,12 @@ def show_encrypt_usage():
583
582
  print(sc)
584
583
  print("")
585
584
  print(" Usage:")
586
- print(" seleniumbase encrypt || seleniumbase obfuscate")
587
- print(" --OR--")
588
- print(" sbase encrypt || sbase obfuscate")
585
+ print(" seleniumbase encrypt || seleniumbase obfuscate")
586
+ print(" --OR--")
587
+ print(" sbase encrypt || sbase obfuscate")
589
588
  print(" Output:")
590
- print(" Runs the password encryption/obfuscation tool.")
591
- print(" (Where you can enter a password to encrypt/obfuscate.)")
589
+ print(" Runs the password encryption/obfuscation tool.")
590
+ print(" (Where you can enter a password to encrypt/obfuscate.)")
592
591
  print("")
593
592
 
594
593
 
@@ -600,12 +599,12 @@ def show_decrypt_usage():
600
599
  print(sc)
601
600
  print("")
602
601
  print(" Usage:")
603
- print(" seleniumbase decrypt || seleniumbase unobfuscate")
604
- print(" --OR--")
605
- print(" sbase decrypt || sbase unobfuscate")
602
+ print(" seleniumbase decrypt || seleniumbase unobfuscate")
603
+ print(" --OR--")
604
+ print(" sbase decrypt || sbase unobfuscate")
606
605
  print(" Output:")
607
- print(" Runs the password decryption/unobfuscation tool.")
608
- print(" (Where you can enter an encrypted password to decrypt.)")
606
+ print(" Runs the password decryption/unobfuscation tool.")
607
+ print(" (Where you can enter an encrypted password to decrypt.)")
609
608
  print("")
610
609
 
611
610
 
@@ -617,11 +616,11 @@ def show_download_usage():
617
616
  print(sc)
618
617
  print("")
619
618
  print(" Usage:")
620
- print(" seleniumbase download server")
621
- print(" OR: sbase download server")
619
+ print(" seleniumbase download server")
620
+ print(" OR: sbase download server")
622
621
  print(" Output:")
623
- print(" Downloads the Selenium Standalone Server.")
624
- print(" (Server is required for using your own Selenium Grid.)")
622
+ print(" Downloads the Selenium Standalone Server.")
623
+ print(" (Server is required for using your own Selenium Grid.)")
625
624
  print("")
626
625
 
627
626
 
@@ -633,22 +632,22 @@ def show_grid_hub_usage():
633
632
  print(sc)
634
633
  print("")
635
634
  print(" Usage:")
636
- print(" seleniumbase grid-hub {start|stop|restart} [OPTIONS]")
637
- print(" OR: sbase grid-hub {start|stop|restart} [OPTIONS]")
635
+ print(" seleniumbase grid-hub {start|stop|restart} [OPTIONS]")
636
+ print(" OR: sbase grid-hub {start|stop|restart} [OPTIONS]")
638
637
  print(" Options:")
639
- print(" -v, --verbose (Increase verbosity of logging output.)")
640
- print(" (Default: Quiet logging / not verbose.)")
641
- print(" --timeout=TIMEOUT (Close idle browser after TIMEOUT.)")
642
- print(" (The default TIMEOUT: 230 seconds.)")
643
- print(" (Use --timeout=0 to skip timeouts.)")
638
+ print(" -v, --verbose (Increase verbosity of logging output.)")
639
+ print(" (Default: Quiet logging / not verbose.)")
640
+ print(" --timeout=TIMEOUT (Close idle browser after TIMEOUT.)")
641
+ print(" (The default TIMEOUT: 230 seconds.)")
642
+ print(" (Use --timeout=0 to skip timeouts.)")
644
643
  print(" Example:")
645
- print(" seleniumbase grid-hub start")
644
+ print(" seleniumbase grid-hub start")
646
645
  print(" Output:")
647
- print(" Controls the Selenium Grid Hub Server, which allows")
648
- print(" for running tests on multiple machines in parallel")
649
- print(" to speed up test runs and reduce the total time")
650
- print(" of test suite execution.")
651
- print(' You can "start" or "stop" the Grid Hub server.')
646
+ print(" Controls the Selenium Grid Hub Server, which allows")
647
+ print(" for running tests on multiple machines in parallel")
648
+ print(" to speed up test runs and reduce the total time")
649
+ print(" of test suite execution.")
650
+ print(' You can "start" or "stop" the Grid Hub server.')
652
651
  print("")
653
652
 
654
653
 
@@ -660,19 +659,19 @@ def show_grid_node_usage():
660
659
  print(sc)
661
660
  print("")
662
661
  print(" Usage:")
663
- print(" seleniumbase grid-node {start|stop|restart} [OPTIONS]")
664
- print(" OR: sbase grid-node {start|stop|restart} [OPTIONS]")
662
+ print(" seleniumbase grid-node {start|stop|restart} [OPTIONS]")
663
+ print(" OR: sbase grid-node {start|stop|restart} [OPTIONS]")
665
664
  print(" Options:")
666
- print(" --hub=[HOST/IP] (The Grid Hub Hostname / IP Address.)")
667
- print(" (Default: 127.0.0.1 if not set.)")
668
- print(" -v, --verbose (Increase verbosity of logging output.)")
669
- print(" (Default: Quiet logging / Not verbose.)")
665
+ print(" --hub=[HOST/IP] (The Grid Hub Hostname / IP Address.)")
666
+ print(" (Default: 127.0.0.1 if not set.)")
667
+ print(" -v, --verbose (Increase verbosity of logging output.)")
668
+ print(" (Default: Quiet logging / Not verbose.)")
670
669
  print(" Example:")
671
- print(" seleniumbase grid-node start --hub=127.0.0.1")
670
+ print(" seleniumbase grid-node start --hub=127.0.0.1")
672
671
  print(" Output:")
673
- print(" Controls the Selenium Grid node, which serves as a")
674
- print(" worker machine for your Selenium Grid Hub server.")
675
- print(' You can "start" or "stop" the Grid node.')
672
+ print(" Controls the Selenium Grid node, which serves as a")
673
+ print(" worker machine for your Selenium Grid Hub server.")
674
+ print(' You can "start" or "stop" the Grid node.')
676
675
  print("")
677
676
 
678
677
 
@@ -799,16 +798,16 @@ def show_options():
799
798
  line = '(Some options are Chromium-specific, e.g. "--guest --mobile")'
800
799
  print(line)
801
800
  op = "\n"
802
- op += '--browser=BROWSER (Choice of web browser. Default is "chrome".)\n'
803
- op += "--edge / --firefox / --safari (Shortcut for browser selection.)\n"
804
- op += "--headless (Run tests headlessly. Default setting on Linux OS.)\n"
805
- op += "--demo (Slow down and visually see test actions as they occur.)\n"
806
- op += "--slow (Slow down the automation. Faster than using Demo Mode.)\n"
801
+ op += '--browser=BROWSER (Choice of web browser. Default is "chrome")\n'
802
+ op += "--edge / --firefox / --safari (Shortcut for browser selection)\n"
803
+ op += "--headless (Run tests headlessly. Default setting on Linux OS)\n"
804
+ op += "--demo (Slow down and visually see test actions as they occur)\n"
805
+ op += "--slow (Slow down the automation. Faster than using Demo Mode)\n"
807
806
  op += "--rs / --reuse-session (Reuse browser session between tests.)\n"
808
807
  op += "--reuse-class-session / --rcs (RS, but for class tests only.)\n"
809
808
  op += "--crumbs (Clear all cookies between tests reusing a session.)\n"
810
- op += "--maximize (Start tests with the web browser window maximized.)\n"
811
- op += "--dashboard (Enable SeleniumBase's Dashboard at dashboard.html)\n"
809
+ op += "--maximize (Start tests with the browser window maximized)\n"
810
+ op += "--dashboard (Enable SeleniumBase Dashboard at dashboard.html)\n"
812
811
  op += "--incognito (Enable Chromium's Incognito Mode.)\n"
813
812
  op += "--guest (Enable Chromium's Guest Mode.)\n"
814
813
  op += "--dark (Enable Chromium's Dark Mode.)\n"
@@ -820,15 +819,15 @@ def show_options():
820
819
  op += "--collect-only / --co (Only show discovered tests. No run.)\n"
821
820
  op += "--co -q (Only show full names of discovered tests. No run.)\n"
822
821
  op += "-x (Stop running tests after the first failure is reached.)\n"
823
- op += "--pdb (Enter the Post Mortem Debug Mode after any test fails.)\n"
824
- op += "--trace (Enter Debug Mode immediately after starting any test.)\n"
825
- op += " | Debug Mode Commands >>> help / h: List all commands. |\n"
826
- op += " | n: Next line of method. s: Step through. c: Continue. |\n"
827
- op += " | return / r: Run until method returns. j: Jump to line. |\n"
828
- op += " | where / w: Show stack spot. u: Up stack. d: Down stack. |\n"
829
- op += " | longlist / ll: See code. dir(): List namespace objects. |\n"
822
+ op += "--pdb (Enter Post Mortem Debug Mode after any test fails.)\n"
823
+ op += "--trace (Enter Debug Mode immediately after starting tests.)\n"
824
+ op += " | Debug Mode Commands >>> help / h: List all commands. |\n"
825
+ op += " | n: Next line of method. s: Step into. c: Continue. |\n"
826
+ op += " | where / w: Show stack spot. u: Up stack. d: Down stack. |\n"
827
+ op += " | return / r: Run until method returns. j: Jump to line. |\n"
828
+ op += " | longlist / ll: See code. dir(): List namespace objects. |\n"
830
829
  op += "--help / -h (Display list of all available pytest options.)\n"
831
- op += "--ftrace / --final-trace (Enter Debug Mode after any test.)\n"
830
+ op += "--ftrace / --final-trace (Enter Debug Mode after tests end.)\n"
832
831
  op += "--recorder / --rec (Save browser actions as Python scripts.)\n"
833
832
  op += "--rec-behave / --rec-gherkin (Save actions as Gherkin code.)\n"
834
833
  op += "--rec-print (Display recorded scripts when they are created.)\n"
@@ -841,14 +840,14 @@ def show_options():
841
840
  op += '--metrics=STRING (Set mobile "CSSWidth,CSSHeight,PixelRatio".)\n'
842
841
  op += "--ad-block (Block certain types of iframe ads from appearing.)\n"
843
842
  op += "--settings-file=FILE (Override default SeleniumBase settings.)\n"
844
- op += '--env=ENV (Set the test env. Access with "self.env" in tests.)\n'
845
- op += '--data=DATA (Extra test data. Access with "self.data" in tests.)\n'
846
- op += "--disable-csp (Disable the Content Security Policy of websites.)\n"
847
- op += "--remote-debug (Sync to Ch-R-Debugger chrome://inspect/#devices)\n"
843
+ op += '--env=ENV (Set the test env. Use "self.env" to access.)\n'
844
+ op += '--data=DATA (Extra test data. Use "self.data" to access.)\n'
845
+ op += "--disable-csp (Disable the Content Security Policy of sites.)\n"
846
+ op += "--remote-debug (Sync to Ch_Debugger chrome://inspect/#devices)\n"
848
847
  op += "--server=SERVER (The Selenium Grid server/IP used for tests.)\n"
849
848
  op += "--port=PORT (The Selenium Grid port used by the test server.)\n"
850
- op += "--proxy=SERVER:PORT (Connect to a proxy server:port for tests.)\n"
851
- op += "--proxy=USER:PASS@SERVER:PORT (Use authenticated proxy server.)\n"
849
+ op += "--proxy=SERVER:PORT (Connect to a proxy server:port for tests)\n"
850
+ op += "--proxy=USER:PASS@SERVER:PORT (Use authenticated proxy server)\n"
852
851
  op += cr
853
852
  op = op.replace("\n-", "\n" + c1 + "-").replace(" (", cr + " (")
854
853
  op = op.replace(" / -", cr + " / " + c1 + "-")
@@ -858,7 +857,8 @@ def show_options():
858
857
  op = op.replace("Debug Mode Commands", c5 + "Debug Mode Commands" + c3)
859
858
  op = op.replace(">>>", c4 + ">>>" + c3)
860
859
  print(op)
861
- line = "For the full list of " + c2 + "command-line options" + cr
860
+ line = "To view all " + c3 + "pytest" + cr
861
+ line += " " + c2 + "command-line options" + cr
862
862
  line += ', type: "' + c3 + "pytest" + cr + " " + c1 + "--help" + cr + '".'
863
863
  print(line)
864
864
  print("")
@@ -880,14 +880,14 @@ def show_behave_options():
880
880
  line = '(Some options are Chromium-specific, e.g. "-D guest -D mobile")'
881
881
  print(line)
882
882
  op = "\n"
883
- op += '-D browser=BROWSER (The web browser to use. Default is "chrome")\n'
883
+ op += '-D browser=BROWSER (Choice of web browser. Default is "chrome")\n'
884
884
  op += "-D headless (Run tests headlessly. Default mode on Linux OS.)\n"
885
- op += "-D demo (Slow down and visually see test actions as they occur.)\n"
886
- op += "-D slow (Slow down the automation. Faster than using Demo Mode.)\n"
885
+ op += "-D demo (Slow down and visually see test actions as they occur)\n"
886
+ op += "-D slow (Slow down the automation. Faster than using Demo Mode)\n"
887
887
  op += "-D reuse-session / -D rs (Reuse browser session between tests.)\n"
888
888
  op += "-D crumbs (Clear all cookies between tests reusing a session.)\n"
889
- op += "-D maximize (Start tests with the web browser window maximized.)\n"
890
- op += "-D dashboard (Enable SeleniumBase's Dashboard at dashboard.html)\n"
889
+ op += "-D maximize (Start tests with the web browser window maximized)\n"
890
+ op += "-D dashboard (Enable SeleniumBase Dashboard at dashboard.html)\n"
891
891
  op += "-D incognito (Enable Chromium's Incognito Mode.)\n"
892
892
  op += "-D guest (Enable Chromium's Guest Mode.)\n"
893
893
  op += "-D dark (Enable Chromium's Dark Mode.)\n"
@@ -896,11 +896,11 @@ def show_behave_options():
896
896
  op += "--dry-run / -d (Dry run. Only show discovered tests.)\n"
897
897
  op += "--stop (Stop running tests after the first failure is reached.)\n"
898
898
  op += "-D pdb (Enter the Post Mortem Debug Mode after any test fails.)\n"
899
- op += " | Debug Mode Commands >>> help / h: List all commands. |\n"
900
- op += " | n: Next line of method. s: Step through. c: Continue. |\n"
901
- op += " | return / r: Run until method returns. j: Jump to line. |\n"
902
- op += " | where / w: Show stack spot. u: Up stack. d: Down stack. |\n"
903
- op += " | longlist / ll: See code. dir(): List namespace objects. |\n"
899
+ op += " | Debug Mode Commands >>> help / h: List all commands. |\n"
900
+ op += " | n: Next line of method. s: Step through. c: Continue. |\n"
901
+ op += " | return / r: Run until method returns. j: Jump to line. |\n"
902
+ op += " | where / w: Show stack spot. u: Up stack. d: Down stack. |\n"
903
+ op += " | longlist / ll: See code. dir(): List namespace objects. |\n"
904
904
  op += "-D recorder (Record browser actions to generate test scripts.)\n"
905
905
  op += "-D rec-print (Display recorded scripts when they are created.)\n"
906
906
  op += "-D save-screenshot (Save a screenshot at the end of each test.)\n"
@@ -912,14 +912,14 @@ def show_behave_options():
912
912
  op += '-D metrics=STRING (Set mobile "CSSWidth,CSSHeight,PixelRatio".)\n'
913
913
  op += "-D ad-block (Block some types of display ads after page loads.)\n"
914
914
  op += "-D settings-file=FILE (Override default SeleniumBase settings.)\n"
915
- op += '-D env=ENV (Set the test env. Access using "self.env" in tests.)\n'
915
+ op += '-D env=ENV (Set the test env. Access using "self.env" in tests)\n'
916
916
  op += '-D data=DATA (Extra test data. Access using "self.data".)\n'
917
917
  op += "-D disable-csp (Disable the Content Security Policy of sites.)\n"
918
918
  op += "-D remote-debug (Sync Ch-R-Debugger chrome://inspect/#devices)\n"
919
919
  op += "-D server=SERVER (The Selenium Grid server/IP used for tests.)\n"
920
920
  op += "-D port=PORT (The Selenium Grid port used by the test server.)\n"
921
- op += "-D proxy=SERVER:PORT (Connect to a proxy server:port for tests.)\n"
922
- op += "-D proxy=USER:PASS@SERVER:PORT (Use authenticated proxy server.)\n"
921
+ op += "-D proxy=SERVER:PORT (Connect to a proxy server:port for tests)\n"
922
+ op += "-D proxy=USER:PASS@SERVER:PORT (Use authenticated proxy server)\n"
923
923
  op += cr
924
924
  op = op.replace("\n-", "\n" + c1 + "-").replace(" (", cr + " (")
925
925
  op = op.replace(" / -", cr + " / " + c1 + "-")
@@ -941,7 +941,7 @@ def show_detailed_help():
941
941
  c6 = colorama.Back.CYAN
942
942
  cr = colorama.Style.RESET_ALL
943
943
  show_basic_usage()
944
- print(c6 + " " + c2 + " Commands: " + c6 + " ")
944
+ print(c6 + " " + c2 + " Commands: " + c6 + " ")
945
945
  print(cr)
946
946
  show_install_usage()
947
947
  show_commander_usage()
@@ -966,7 +966,10 @@ def show_detailed_help():
966
966
  show_download_usage()
967
967
  show_grid_hub_usage()
968
968
  show_grid_node_usage()
969
- print('* (Use "' + c3 + "pytest" + cr + '" for running tests) *\n')
969
+ print(
970
+ '* (Use "' + c3 + "pytest" + cr + '" or "' + c3 + ''
971
+ '' + "python" + cr + '" for running tests) *\n'
972
+ )
970
973
 
971
974
 
972
975
  def main():
@@ -974,7 +977,7 @@ def main():
974
977
  command_args = None
975
978
  num_args = len(sys.argv)
976
979
  if num_args == 1:
977
- show_usage()
980
+ show_basic_usage()
978
981
  return
979
982
  elif num_args == 2:
980
983
  command = sys.argv[1]
@@ -1202,7 +1205,7 @@ def main():
1202
1205
  else:
1203
1206
  show_basic_usage()
1204
1207
  show_grid_node_usage()
1205
- elif command == "version" or command == "--version":
1208
+ elif command == "version" or command == "--version" or command == "-v":
1206
1209
  if len(command_args) == 0:
1207
1210
  from seleniumbase.console_scripts import logo_helper
1208
1211
 
@@ -1238,7 +1241,7 @@ def main():
1238
1241
  "proxy.py", version=constants.ProxyPy.VER
1239
1242
  )
1240
1243
  os.system("proxy %s" % " ".join(sys.argv[2:]))
1241
- elif command == "help" or command == "--help":
1244
+ elif command == "help" or command == "--help" or command == "-h":
1242
1245
  if len(command_args) >= 1:
1243
1246
  if command_args[0] == "get":
1244
1247
  print("")
@@ -1362,7 +1365,7 @@ def main():
1362
1365
  return
1363
1366
  show_detailed_help()
1364
1367
  else:
1365
- show_usage()
1368
+ show_basic_usage()
1366
1369
  c5 = colorama.Fore.RED + colorama.Back.LIGHTYELLOW_EX
1367
1370
  c7 = colorama.Fore.BLACK + colorama.Back.MAGENTA
1368
1371
  cr = colorama.Style.RESET_ALL