Edge web Driver ver 108.0.1462.42 , but Edge ver 108.0.462.46

HuLeo 1 Reputation point
2022-12-13T07:22:57.757+00:00

Edge Driver version and Edge version do not match. Automation failed due to version mismatch

Edge version:108.0.462.46
270067-111.png

Edge web Driver ver 108.0.1462.42
270104-222.png

python run-time error
270006-333.png

Microsoft Edge
Microsoft Edge
A Microsoft cross-platform web browser that provides privacy, learning, and accessibility tools.
2,464 questions
{count} votes

1 answer

Sort by: Most helpful
  1. ShiJieLi-MSFT 11,741 Reputation points Microsoft Vendor
    2022-12-14T02:18:58.863+00:00

    Hi @HuLeo ,

    It looks like your Edge driver with version 108 is not recognized by Selenium, and version 105 is used instead. You need to put the driver with version 108 in the PATH, or simply specify your driver location via Service object. Code example:

    from selenium import webdriver  
    from selenium.webdriver.edge.service import Service  
      
    s = Service('C:\path\to\msedgedriver.exe')  
    driver = webdriver.Edge(service=s)  
    # comparing versions between the browser and driver  
    str1 = driver.capabilities['browserVersion']  
    str2 = driver.capabilities['msedge']['msedgedriverVersion'].split(' ')[0]  
    print(str1)  
    print(str2)  
    driver.get('https://www.example.com')  
    

    Output:

    108.0.1462.46  
    108.0.1462.42  
    

    And the automation is successfully launched.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Best Regards,
    Shijie Li

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.