3
3
4
4
Usage:
5
5
seleniumbase [COMMAND] [PARAMETERS]
6
+ OR sbase [COMMAND] [PARAMETERS]
6
7
7
8
Examples:
8
- seleniumbase install chromedriver
9
- seleniumbase mkdir browser_tests
10
- seleniumbase convert my_old_webdriver_unittest.py
11
- seleniumbase translate my_first_test.py --zh -p
12
- seleniumbase extract-objects my_first_test.py
13
- seleniumbase inject-objects my_first_test.py
14
- seleniumbase objectify my_first_test.py
15
- seleniumbase revert-objects my_first_test.py
16
- seleniumbase encrypt OR seleniumbase obfuscate
17
- seleniumbase decrypt OR seleniumbase unobfuscate
18
- seleniumbase download server
19
- seleniumbase grid-hub start
20
- seleniumbase grid-node start --hub=127.0.0.1
9
+ sbase install chromedriver
10
+ sbase mkdir browser_tests
11
+ sbase convert my_old_webdriver_unittest.py
12
+ sbase translate my_first_test.py --zh -p
13
+ sbase extract-objects my_first_test.py
14
+ sbase inject-objects my_first_test.py
15
+ sbase objectify my_first_test.py
16
+ sbase revert-objects my_first_test.py
17
+ sbase encrypt
18
+ sbase decrypt
19
+ sbase download server
20
+ sbase grid-hub start
21
+ sbase grid-node start --hub=127.0.0.1
21
22
"""
22
23
23
24
import colorama
37
38
def show_usage ():
38
39
show_basic_usage ()
39
40
sc = ("" )
40
- sc += ('Type "seleniumbase -- help" for details on all commands .\n ' )
41
- sc += ('Type "seleniumbase help [COMMAND]" for specific command info .\n ' )
41
+ sc += ('Type "sbase help [COMMAND] " for specific command info .\n ' )
42
+ sc += ('For info on all commands, type: "seleniumbase --help" .\n ' )
42
43
sc += ('* (Use "pytest" for running tests) *\n ' )
43
44
c1 = colorama .Fore .BLUE + colorama .Back .LIGHTCYAN_EX
44
45
c2 = colorama .Fore .BLUE + colorama .Back .LIGHTGREEN_EX
45
46
c3 = colorama .Fore .BLUE + colorama .Back .LIGHTYELLOW_EX
46
47
c4 = colorama .Fore .MAGENTA + colorama .Back .LIGHTYELLOW_EX
47
48
cr = colorama .Style .RESET_ALL
48
49
sc = sc .replace ("seleniumbase" , c1 + "selenium" + c2 + "base" + cr )
50
+ sc = sc .replace ("sbase" , c1 + "s" + c2 + "base" + cr )
49
51
sc = sc .replace ("pytest" , c3 + "pytest" + cr )
50
52
sc = sc .replace ("--help" , c4 + "--help" + cr )
51
53
sc = sc .replace ("help" , c4 + "help" + cr )
@@ -57,28 +59,31 @@ def show_basic_usage():
57
59
print (seleniumbase_logo )
58
60
print ("%s" % get_version ()[0 :1 ])
59
61
print ("" )
60
- sc = ("\n " )
62
+ sc = ("" )
61
63
sc += ('Usage: "seleniumbase [COMMAND] [PARAMETERS]"\n ' )
64
+ sc += ('(short name): "sbase [COMMAND] [PARAMETERS]"\n ' )
65
+ sc += ("\n " )
62
66
sc += ("Commands:\n " )
63
- sc += (" install [DRIVER_NAME] [OPTIONS]\n " )
64
- sc += (" mkdir [NEW_TEST_DIRECTORY_NAME]\n " )
65
- sc += (" convert [PYTHON_WEBDRIVER_UNITTEST_FILE]\n " )
66
- sc += (" translate [SB_PYTHON_FILE] [LANGUAGE] [ACTION]\n " )
67
- sc += (" extract-objects [SB_PYTHON_FILE]\n " )
68
- sc += (" inject-objects [SB_PYTHON_FILE] [OPTIONS]\n " )
69
- sc += (" objectify [SB_PYTHON_FILE] [OPTIONS]\n " )
70
- sc += (" revert-objects [SB_PYTHON_FILE]\n " )
71
- sc += (" encrypt (OR: obfuscate)\n " )
72
- sc += (" decrypt (OR: unobfuscate)\n " )
73
- sc += (" download server (The Selenium Server JAR file)\n " )
74
- sc += (" grid-hub [start|stop] [OPTIONS]\n " )
75
- sc += (" grid-node [start|stop] --hub=[HUB_IP] [OPTIONS]\n " )
76
- sc += (' * (EXAMPLE: "seleniumbase install chromedriver latest") *\n ' )
67
+ sc += (" install [DRIVER_NAME] [OPTIONS]\n " )
68
+ sc += (" mkdir [NEW_TEST_DIRECTORY_NAME]\n " )
69
+ sc += (" convert [PYTHON_WEBDRIVER_UNITTEST_FILE]\n " )
70
+ sc += (" translate [SB_PYTHON_FILE] [LANGUAGE] [ACTION]\n " )
71
+ sc += (" extract-objects [SB_PYTHON_FILE]\n " )
72
+ sc += (" inject-objects [SB_PYTHON_FILE] [OPTIONS]\n " )
73
+ sc += (" objectify [SB_PYTHON_FILE] [OPTIONS]\n " )
74
+ sc += (" revert-objects [SB_PYTHON_FILE]\n " )
75
+ sc += (" encrypt (OR: obfuscate)\n " )
76
+ sc += (" decrypt (OR: unobfuscate)\n " )
77
+ sc += (" download server ( Selenium Server JAR file)\n " )
78
+ sc += (" grid-hub [start|stop] [OPTIONS]\n " )
79
+ sc += (" grid-node [start|stop] --hub=[HUB_IP] [OPTIONS]\n " )
80
+ sc += (' * (EXAMPLE: "sbase install chromedriver latest") *\n ' )
77
81
sc += ("" )
78
82
c1 = colorama .Fore .BLUE + colorama .Back .LIGHTCYAN_EX
79
83
c2 = colorama .Fore .BLUE + colorama .Back .LIGHTGREEN_EX
80
84
cr = colorama .Style .RESET_ALL
81
85
sc = sc .replace ("seleniumbase" , c1 + "selenium" + c2 + "base" + cr )
86
+ sc = sc .replace ("sbase" , c1 + "s" + c2 + "base" + cr )
82
87
print (sc )
83
88
84
89
@@ -87,6 +92,7 @@ def show_install_usage():
87
92
print ("" )
88
93
print (" Usage:" )
89
94
print (" seleniumbase install [DRIVER_NAME] [OPTIONS]" )
95
+ print (" OR: sbase install [DRIVER_NAME] [OPTIONS]" )
90
96
print (" (Drivers: chromedriver, geckodriver, edgedriver" )
91
97
print (" iedriver, operadriver)" )
92
98
print (" Options:" )
@@ -116,6 +122,7 @@ def show_mkdir_usage():
116
122
print ("" )
117
123
print (" Usage:" )
118
124
print (" seleniumbase mkdir [DIRECTORY_NAME]" )
125
+ print (" OR: sbase mkdir [DIRECTORY_NAME]" )
119
126
print (" Example:" )
120
127
print (" seleniumbase mkdir browser_tests" )
121
128
print (" Output:" )
@@ -132,6 +139,7 @@ def show_convert_usage():
132
139
print ("" )
133
140
print (" Usage:" )
134
141
print (" seleniumbase convert [PYTHON_WEBDRIVER_UNITTEST_FILE]" )
142
+ print (" OR: sbase convert [PYTHON_WEBDRIVER_UNITTEST_FILE]" )
135
143
print (" Output:" )
136
144
print (" Converts a Selenium IDE exported WebDriver unittest" )
137
145
print (" file into a SeleniumBase file. Adds _SB to the new" )
@@ -145,6 +153,7 @@ def show_translate_usage():
145
153
print (" ** translate **" )
146
154
print (" Usage:" )
147
155
print (" seleniumbase translate [SB_FILE].py [LANGUAGE] [ACTION]" )
156
+ print (" OR: sbase translate [SB_FILE].py [LANGUAGE] [ACTION]" )
148
157
print (" Languages:" )
149
158
print (" --en / --English | --zh / --Chinese" )
150
159
print (" --nl / --Dutch | --fr / --French" )
@@ -173,6 +182,7 @@ def show_extract_objects_usage():
173
182
print ("" )
174
183
print (" Usage:" )
175
184
print (" seleniumbase extract-objects [SELENIUMBASE_PYTHON_FILE]" )
185
+ print (" OR: sbase extract-objects [SELENIUMBASE_PYTHON_FILE]" )
176
186
print (" Output:" )
177
187
print (" Creates page objects based on selectors found in a" )
178
188
print (" seleniumbase Python file and saves those objects to the" )
@@ -185,6 +195,7 @@ def show_inject_objects_usage():
185
195
print ("" )
186
196
print (" Usage:" )
187
197
print (" seleniumbase inject-objects [SELENIUMBASE_PYTHON_FILE]" )
198
+ print (" OR: sbase inject-objects [SELENIUMBASE_PYTHON_FILE]" )
188
199
print (" Options:" )
189
200
print (" -c, --comments (Add object selectors to the comments.)" )
190
201
print (" (Default: No added comments.)" )
@@ -200,6 +211,7 @@ def show_objectify_usage():
200
211
print ("" )
201
212
print (" Usage:" )
202
213
print (" seleniumbase objectify [SELENIUMBASE_PYTHON_FILE]" )
214
+ print (" OR: sbase objectify [SELENIUMBASE_PYTHON_FILE]" )
203
215
print (" Options:" )
204
216
print (" -c, --comments (Add object selectors to the comments.)" )
205
217
print (" (Default: No added comments.)" )
@@ -218,6 +230,7 @@ def show_revert_objects_usage():
218
230
print ("" )
219
231
print (" Usage:" )
220
232
print (" seleniumbase revert-objects [SELENIUMBASE_PYTHON_FILE]" )
233
+ print (" OR: sbase revert-objects [SELENIUMBASE_PYTHON_FILE]" )
221
234
print (" Options:" )
222
235
print (" -c, --comments (Keep existing comments for the lines.)" )
223
236
print (" (Default: No comments are kept.)" )
@@ -233,11 +246,11 @@ def show_encrypt_usage():
233
246
print (" ** encrypt OR obfuscate **" )
234
247
print ("" )
235
248
print (" Usage:" )
236
- print (" seleniumbase encrypt" )
237
- print (" OR " )
238
- print (" seleniumbase obfuscate" )
249
+ print (" seleniumbase encrypt || seleniumbase obfuscate " )
250
+ print (" --OR-- " )
251
+ print (" sbase encrypt || sbase obfuscate" )
239
252
print (" Output:" )
240
- print (" Runs the password obfuscation tool." )
253
+ print (" Runs the password encryption/ obfuscation tool." )
241
254
print (" (Where you can enter a password to encrypt/obfuscate.)" )
242
255
print ("" )
243
256
@@ -246,9 +259,9 @@ def show_decrypt_usage():
246
259
print (" ** decrypt OR unobfuscate **" )
247
260
print ("" )
248
261
print (" Usage:" )
249
- print (" seleniumbase decrypt" )
250
- print (" OR " )
251
- print (" seleniumbase unobfuscate" )
262
+ print (" seleniumbase decrypt || seleniumbase unobfuscate " )
263
+ print (" --OR-- " )
264
+ print (" sbase decrypt || sbase unobfuscate" )
252
265
print (" Output:" )
253
266
print (" Runs the password decryption/unobfuscation tool." )
254
267
print (" (Where you can enter an encrypted password to decrypt.)" )
@@ -260,6 +273,7 @@ def show_download_usage():
260
273
print ("" )
261
274
print (" Usage:" )
262
275
print (" seleniumbase download server" )
276
+ print (" OR: sbase download server" )
263
277
print (" Output:" )
264
278
print (" Downloads the Selenium Standalone Server." )
265
279
print (" (Server is required for using your own Selenium Grid.)" )
@@ -271,6 +285,7 @@ def show_grid_hub_usage():
271
285
print ("" )
272
286
print (" Usage:" )
273
287
print (" seleniumbase grid-hub {start|stop}" )
288
+ print (" OR: sbase grid-hub {start|stop}" )
274
289
print (" Options:" )
275
290
print (" -v, --verbose (Increase verbosity of logging output.)" )
276
291
print (" (Default: Quiet logging / not verbose.)" )
@@ -290,6 +305,7 @@ def show_grid_node_usage():
290
305
print ("" )
291
306
print (" Usage:" )
292
307
print (" seleniumbase grid-node {start|stop} [OPTIONS]" )
308
+ print (" OR: sbase grid-node {start|stop} [OPTIONS]" )
293
309
print (" Options:" )
294
310
print (" --hub=[HUB_IP] (The Grid Hub IP Address to connect to.)" )
295
311
print (" (Default: 127.0.0.1 if not set)" )
0 commit comments