8
8
seleniumbase install chromedriver
9
9
seleniumbase mkdir browser_tests
10
10
seleniumbase convert my_old_webdriver_unittest.py
11
+ seleniumbase download server
11
12
seleniumbase grid-hub start
12
13
seleniumbase grid-node start --hub=127.0.0.1
13
14
"""
14
15
15
16
import sys
16
17
from seleniumbase .console_scripts import sb_mkdir
17
18
from seleniumbase .console_scripts import sb_install
19
+ from seleniumbase .utilities .selenium_grid import download_selenium_server
18
20
from seleniumbase .utilities .selenium_grid import grid_hub
19
21
from seleniumbase .utilities .selenium_grid import grid_node
20
22
from seleniumbase .utilities .selenium_ide import convert_ide
@@ -91,6 +93,20 @@ def show_convert_usage():
91
93
print ("" )
92
94
93
95
96
+ def show_download_usage ():
97
+ print (" ** download **" )
98
+ print ("" )
99
+ print (" Usage:" )
100
+ print (" seleniumbase download [ITEM]" )
101
+ print (" (Options: server" )
102
+ print (" Example:" )
103
+ print (" seleniumbase download server" )
104
+ print (" Output:" )
105
+ print (" Downloads the specified item." )
106
+ print (" (server is required for using your own Selenium Grid)" )
107
+ print ("" )
108
+
109
+
94
110
def show_grid_hub_usage ():
95
111
print (" ** grid-hub **" )
96
112
print ("" )
@@ -132,6 +148,7 @@ def show_detailed_help():
132
148
show_install_usage ()
133
149
show_mkdir_usage ()
134
150
show_convert_usage ()
151
+ show_download_usage ()
135
152
show_grid_hub_usage ()
136
153
show_grid_node_usage ()
137
154
@@ -169,6 +186,12 @@ def main():
169
186
else :
170
187
show_basic_usage ()
171
188
show_mkdir_usage ()
189
+ elif command == "download" :
190
+ if len (command_args ) >= 1 :
191
+ download_selenium_server .main (force_download = True )
192
+ else :
193
+ show_basic_usage ()
194
+ show_download_usage ()
172
195
elif command == "grid-hub" :
173
196
if len (command_args ) >= 1 :
174
197
grid_hub .main ()
@@ -195,6 +218,10 @@ def main():
195
218
print ("" )
196
219
show_convert_usage ()
197
220
return
221
+ elif command_args [0 ] == "download" :
222
+ print ("" )
223
+ show_download_usage ()
224
+ return
198
225
elif command_args [0 ] == "grid-hub" :
199
226
print ("" )
200
227
show_grid_hub_usage ()
0 commit comments