diff options
author | jboardman367 <80042384+jboardman367@users.noreply.github.com> | 2023-07-01 21:21:26 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-01 13:21:26 +0200 |
commit | c2f7c9a07911691b112b5338008e2ec932e7aee0 (patch) | |
tree | 59886a1143cc4043b19e398fae1fddb5742b4b55 | |
parent | d294378bb8085488fd1365f5f80d6d0ef39623dd (diff) |
Update chrome driver usage to support selenium 4 initialisation, specify selenium 4 in requirements. (#619)
-rw-r--r-- | src/main/python/rlbot/botmanager/scratch_manager.py | 4 | ||||
-rw-r--r-- | src/main/python/setup.py | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/main/python/rlbot/botmanager/scratch_manager.py b/src/main/python/rlbot/botmanager/scratch_manager.py index 77cff254..d63fcb5f 100644 --- a/src/main/python/rlbot/botmanager/scratch_manager.py +++ b/src/main/python/rlbot/botmanager/scratch_manager.py @@ -22,6 +22,7 @@ from rlbot.utils.structures.game_interface import GameInterface from selenium import webdriver from selenium.common.exceptions import SessionNotCreatedException from selenium.webdriver.chrome.options import Options +from selenium.webdriver.chrome.service import Service from selenium.webdriver.common.by import By from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.support.wait import WebDriverWait @@ -118,7 +119,8 @@ class ScratchManager(BotHelperProcess): try: driver_path = self.get_driver_path_retryable() - driver = webdriver.Chrome(driver_path, chrome_options=options) + service = Service(executable_path=driver_path) + driver = webdriver.Chrome(service=service, options=options) driver.get( f"http://scratch.rlbot.org?host=localhost:{str(self.port)}&players={players_string}&awaitBotFile=1") diff --git a/src/main/python/setup.py b/src/main/python/setup.py index 6e0dccb4..b5c71b24 100644 --- a/src/main/python/setup.py +++ b/src/main/python/setup.py @@ -17,7 +17,7 @@ setuptools.setup( 'websockets', 'dataclasses', # Python 3.6 compatibility 'webdriver_manager', # For scratch bots - 'selenium', # For scratch bots + 'selenium==4.*', # For scratch bots 'requirements-parser', 'docopt', # Used by standalone agents ], |