
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