Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Driver cache doesn't work with WDM 3.5.3(Win) #311

Closed
Alnovekio opened this issue Feb 21, 2022 · 0 comments · Fixed by #313
Closed

Driver cache doesn't work with WDM 3.5.3(Win) #311

Alnovekio opened this issue Feb 21, 2022 · 0 comments · Fixed by #313
Assignees

Comments

@Alnovekio
Copy link

It always tries to download a new webdriver though there's already an available cache. So I checked the code and found something maybe cause the problem.
driver_cache.py

def find_driver(self, browser_version, driver_name, os_type, driver_version):
    ...
    path = os.path.join(self._drivers_directory, driver_name, os_type, driver_version)
    binary_path = os.path.join(path, driver_name)
    if not os.path.exists(binary_path):
        return None
    ...

I'm not a cross-platform programmer, but I suppose maybe you forgot the ".exe" extension for binaries on Windows platform.
&& There's another thing that, for MSEdge, the driver_name is "edgedriver" while its binary's name is "msedgedriver". driver_name and binary name doesn't always the same.
Please spare some time to fix this small problem, thank you in advance.

aleksandr-kotlyar added a commit to aleksandr-kotlyar/webdriver_manager that referenced this issue Feb 21, 2022
- also fix find 'msedgedriver' in cache for all OS's.
aleksandr-kotlyar added a commit to aleksandr-kotlyar/webdriver_manager that referenced this issue Feb 21, 2022
aleksandr-kotlyar added a commit to aleksandr-kotlyar/webdriver_manager that referenced this issue Feb 21, 2022
aleksandr-kotlyar added a commit to aleksandr-kotlyar/webdriver_manager that referenced this issue Feb 21, 2022
aleksandr-kotlyar added a commit that referenced this issue Feb 21, 2022
* gh #311 fix find all drivers in cache for Windows;

- also fix find 'msedgedriver' in cache for all OS's.

* gh #311 reduce arguments in find_driver,save_file_to_cache

* gh #311 cache self._version since it has been determined once

* gh #311 code cov upload even if tests failed
@aleksandr-kotlyar aleksandr-kotlyar self-assigned this May 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants