GCuser99 / SeleniumVBA

A comprehensive Selenium wrapper for browser automation developed for MS Office VBA running in Windows

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Edge Driver Download Not Successful

GCuser99 opened this issue · comments

commented

Today, Nov. 3rd, 2022, the auto-check-and-install for the latest Edge WebDriver broke for me in DownloadAndInstallDriver sub of WebDriverManager class.

My current Edge browser version: 107.0.1418.26
The driver version returned by GetCompatibleDriverVersion: 107.0.1418.28

However, that driver version is only available for the Mac OS, and not yet available for Windows. When the DownloadAndInstallDriver is called, it tries to download the driver and raises the "Error: Driver Download Not Successful" error below:

    'download driver zip file to temp install path
    URLDownloadToFile 0, url, tmpInstallZipPath, 0, 0
    
    'make sure driver zip file was created successfully
    If Not fso.FileExists(tmpInstallZipPath) Then
        'clean up first
        If createdTmpFolder Then fso.DeleteFolder Left(tmpInstallFolder, Len(tmpInstallFolder) - 1), True
        Err.raise 1, "WebDriverManager", "Error: Driver Download Not Successful"
    End If

So... in keeping with the "do no harm" principle that we have adopted for auto-check-and-install, we need to refactor to detect and handle the situation when the latest compatible version is not yet available for Windows.

commented

This situation has happened before - see MicrosoftEdge/EdgeWebDriver#39 (comment) for more detailed discussion.

Apparently, we can use this endpoint to get the correct windows version: https://msedgedriver.azureedge.net/LATEST_RELEASE_107_WINDOWS. I checked and it does indeed return a valid Windows driver version 107.0.1418.26 (not 107.0.1418.28).

commented

Thanks for solving this!