8
8
seleniumbase install chromedriver
9
9
seleniumbase mkdir browser_tests
10
10
seleniumbase convert my_old_webdriver_unittest.py
11
+ seleniumbase extract-objects my_first_test.py
12
+ seleniumbase inject-objects my_first_test.py
13
+ seleniumbase objectify my_first_test.py
14
+ seleniumbase revert-objects my_first_test.py
15
+ seleniumbase encrypt OR seleniumbase obfuscate
16
+ seleniumbase decrypt OR seleniumbase unobfuscate
11
17
seleniumbase download server
12
18
seleniumbase grid-hub start
13
19
seleniumbase grid-node start --hub=127.0.0.1
14
20
"""
15
21
16
22
import sys
23
+ from seleniumbase .common import obfuscate
24
+ from seleniumbase .common import unobfuscate
17
25
from seleniumbase .console_scripts import logo_helper
18
26
from seleniumbase .console_scripts import sb_mkdir
19
27
from seleniumbase .console_scripts import sb_install
@@ -44,6 +52,8 @@ def show_basic_usage():
44
52
print (" inject-objects [SELENIUMBASE_PYTHON_FILE] [OPTIONS]" )
45
53
print (" objectify [SELENIUMBASE_PYTHON_FILE] [OPTIONS]" )
46
54
print (" revert-objects [SELENIUMBASE_PYTHON_FILE]" )
55
+ print (" encrypt OR obfuscate" )
56
+ print (" decrypt OR unobfuscate" )
47
57
print (" download server" )
48
58
print (" grid-hub [start|stop|restart] [OPTIONS]" )
49
59
print (" grid-node [start|stop|restart] --hub=[HUB_IP] [OPTIONS]" )
@@ -171,6 +181,32 @@ def show_revert_objects_usage():
171
181
print ("" )
172
182
173
183
184
+ def show_encrypt_usage ():
185
+ print (" ** encrypt OR obfuscate **" )
186
+ print ("" )
187
+ print (" Usage:" )
188
+ print (" seleniumbase encrypt" )
189
+ print (" OR" )
190
+ print (" seleniumbase obfuscate" )
191
+ print (" Output:" )
192
+ print (" Runs the password obfuscation tool." )
193
+ print (" (Where you can enter a password to encrypt/obfuscate.)" )
194
+ print ("" )
195
+
196
+
197
+ def show_decrypt_usage ():
198
+ print (" ** decrypt OR unobfuscate **" )
199
+ print ("" )
200
+ print (" Usage:" )
201
+ print (" seleniumbase decrypt" )
202
+ print (" OR" )
203
+ print (" seleniumbase unobfuscate" )
204
+ print (" Output:" )
205
+ print (" Runs the password decryption/unobfuscation tool." )
206
+ print (" (Where you can enter an encrypted password to decrypt.)" )
207
+ print ("" )
208
+
209
+
174
210
def show_download_usage ():
175
211
print (" ** download **" )
176
212
print ("" )
@@ -189,7 +225,9 @@ def show_grid_hub_usage():
189
225
print (" seleniumbase grid-hub {start|stop|restart}" )
190
226
print (" Options:" )
191
227
print (" -v, --verbose (Increase verbosity of logging output.)" )
192
- print (" (Default: Quiet logging / not verbose.)" )
228
+ print (" (Default: Quiet logging / not verbose.)" )
229
+ print (" Example:" )
230
+ print (" seleniumbase grid-hub start" )
193
231
print (" Output:" )
194
232
print (" Controls the Selenium Grid Hub Server, which allows" )
195
233
print (" for running tests on multiple machines in parallel" )
@@ -205,10 +243,12 @@ def show_grid_node_usage():
205
243
print (" Usage:" )
206
244
print (" seleniumbase grid-node {start|stop|restart} [OPTIONS]" )
207
245
print (" Options:" )
208
- print (" --hub=HUB_IP (The Grid Hub IP Address to connect to.)" )
209
- print (" (Default: 127.0.0.1 if not set)" )
246
+ print (" --hub=[ HUB_IP] (The Grid Hub IP Address to connect to.)" )
247
+ print (" (Default: 127.0.0.1 if not set)" )
210
248
print (" -v, --verbose (Increase verbosity of logging output.)" )
211
- print (" (Default: Quiet logging / not verbose.)" )
249
+ print (" (Default: Quiet logging / not verbose.)" )
250
+ print (" Example:" )
251
+ print (" seleniumbase grid-node start --hub=127.0.0.1" )
212
252
print (" Output:" )
213
253
print (" Controls the Selenium Grid node, which serves as a" )
214
254
print (" worker machine for your Selenium Grid Hub server." )
@@ -253,6 +293,12 @@ def main():
253
293
else :
254
294
show_basic_usage ()
255
295
show_install_usage ()
296
+ elif command == "mkdir" :
297
+ if len (command_args ) >= 1 :
298
+ sb_mkdir .main ()
299
+ else :
300
+ show_basic_usage ()
301
+ show_mkdir_usage ()
256
302
elif command == "convert" :
257
303
if len (command_args ) == 1 :
258
304
convert_ide .main ()
@@ -283,12 +329,18 @@ def main():
283
329
else :
284
330
show_basic_usage ()
285
331
show_revert_objects_usage ()
286
- elif command == "mkdir " :
287
- if len (command_args ) >= 1 :
288
- sb_mkdir .main ()
332
+ elif command == "encrypt" or command == "obfuscate " :
333
+ if len (command_args ) >= 0 :
334
+ obfuscate .main ()
289
335
else :
290
336
show_basic_usage ()
291
- show_mkdir_usage ()
337
+ show_encrypt_usage ()
338
+ elif command == "decrypt" or command == "unobfuscate" :
339
+ if len (command_args ) >= 0 :
340
+ unobfuscate .main ()
341
+ else :
342
+ show_basic_usage ()
343
+ show_decrypt_usage ()
292
344
elif command == "download" :
293
345
if len (command_args ) >= 1 and command_args [0 ].lower () == "server" :
294
346
download_selenium_server .main (force_download = True )
@@ -337,6 +389,22 @@ def main():
337
389
print ("" )
338
390
show_revert_objects_usage ()
339
391
return
392
+ elif command_args [0 ] == "encrypt" :
393
+ print ("" )
394
+ show_encrypt_usage ()
395
+ return
396
+ elif command_args [0 ] == "obfuscate" :
397
+ print ("" )
398
+ show_encrypt_usage ()
399
+ return
400
+ elif command_args [0 ] == "decrypt" :
401
+ print ("" )
402
+ show_decrypt_usage ()
403
+ return
404
+ elif command_args [0 ] == "unobfuscate" :
405
+ print ("" )
406
+ show_decrypt_usage ()
407
+ return
340
408
elif command_args [0 ] == "download" :
341
409
print ("" )
342
410
show_download_usage ()
0 commit comments