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