Fix issue with old chromedriver versions

This commit is contained in:
Michael Mintz 2023-08-05 14:44:54 -04:00
parent a3b6d8e269
commit ab3b14986f
1 changed files with 14 additions and 0 deletions

View File

@ -3164,6 +3164,13 @@ def get_local_driver(
cdp_events = uc_cdp_events
cert = "unable to get local issuer certificate"
mac_certificate_error = False
if (
use_version.isnumeric()
and int(use_version) <= 74
):
chrome_options.add_experimental_option(
"w3c", True
)
try:
uc_path = None
if os.path.exists(LOCAL_UC_DRIVER):
@ -3213,6 +3220,13 @@ def get_local_driver(
)
uc_activated = True
else:
if (
use_version.isnumeric()
and int(use_version) <= 74
):
chrome_options.add_experimental_option(
"w3c", True
)
service = ChromeService(
executable_path=LOCAL_CHROMEDRIVER,
log_output=os.devnull,