Skip to content

Commit 3460dbd

Browse files
committed
Add option to force the download of a newer selenium server jar file
1 parent 89cfff4 commit 3460dbd

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

seleniumbase/utilities/selenium_grid/download_selenium_server.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ def is_available_locally():
3939
return os.path.isfile(FULL_EXPECTED_PATH)
4040

4141

42-
def main():
43-
if not is_available_locally():
42+
def main(force_download=True):
43+
if force_download or not is_available_locally():
4444
download_selenium_server()
4545
for filename in os.listdir("."):
4646
# If multiple copies exist, keep only the latest and rename it.

seleniumbase/utilities/selenium_grid/grid_hub.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def main():
5050
file.close()
5151

5252
from seleniumbase.utilities.selenium_grid import download_selenium_server
53-
download_selenium_server.main() # Nothing happens if already exists
53+
download_selenium_server.main(force_download=False) # Only runs if needed
5454

5555
if "linux" in sys.platform or "darwin" in sys.platform:
5656
if grid_hub_command == "start":

seleniumbase/utilities/selenium_grid/grid_node.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def main():
6161
file.close()
6262

6363
from seleniumbase.utilities.selenium_grid import download_selenium_server
64-
download_selenium_server.main() # Nothing happens if already exists
64+
download_selenium_server.main(force_download=False) # Only runs if needed
6565

6666
if "linux" in sys.platform or "darwin" in sys.platform:
6767
if grid_hub_command == "start":

0 commit comments

Comments
 (0)