Skip to content

Commit

Permalink
Use win64 for newer Chromedriver versions
Browse files Browse the repository at this point in the history
When downloading version 118, I was pulling the win32 package even on a 64 bit arch
  • Loading branch information
vhalis authored Nov 30, 2023
1 parent 178a390 commit f14783b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion webdriver_manager/chrome.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os
from packaging import version
from typing import Optional

from webdriver_manager.core.download_manager import DownloadManager
Expand Down Expand Up @@ -26,6 +27,7 @@ def __init__(
os_system_manager=os_system_manager
)

self.driver_version = driver_version
self.driver = ChromeDriver(
name=name,
driver_version=driver_version,
Expand All @@ -44,7 +46,10 @@ def install(self) -> str:
def get_os_type(self):
os_type = super().get_os_type()
if "win" in os_type:
return "win32"
if version.parse(self.driver_version) >= version.parse("115"):
return os_type
else:
return "win32"

if not self._os_system_manager.is_mac_os(os_type):
return os_type
Expand Down

0 comments on commit f14783b

Please sign in to comment.