Skip to content

Commit

Permalink
changed: support for webdriver manager v4.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
henriquelino committed Aug 3, 2023
1 parent 5798211 commit eaffe1a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/selenium_tkit/chrome.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from undetected_chromedriver.patcher import Patcher
from urllib3.exceptions import MaxRetryError
from webdriver_manager.chrome import ChromeDriverManager
from webdriver_manager.core.driver_cache import DriverCacheManager

from .custom_webdriver import CustomWebDriver

Expand Down Expand Up @@ -81,7 +82,8 @@ def __init__(

if isinstance(driver_path, Path):
driver_path = str(driver_path)
self.driver_path = ChromeDriverManager(path=driver_path).install()
cache = DriverCacheManager(driver_path)
self.driver_path = ChromeDriverManager(cache_manager=cache).install()

if apply_patch:
patcher = Patcher(executable_path=self.driver_path, force=False)
Expand Down Expand Up @@ -314,7 +316,8 @@ def __init__(

if isinstance(driver_path, Path):
driver_path = str(driver_path)
self.driver_path = ChromeDriverManager(path=driver_path).install()
cache = DriverCacheManager(driver_path)
self.driver_path = ChromeDriverManager(cache_manager=cache).install()

self.implicity_wait = implicity_wait
self.port = port
Expand Down

0 comments on commit eaffe1a

Please sign in to comment.