There is impossible to run current latest Edge browser with related edgedriver (both versions are 88.0.685.3)
Python code:
from msedge.selenium_tools import Edge, EdgeOptions
options = EdgeOptions()
options.binary_location = '/opt/microsoft/msedge-dev/microsoft-edge-dev'
options.use_chromium = True
browser = Edge(options=options, executable_path='/home/vovyc/edge_linux_64bit_88_0_685_3')
browser.get('https://microsoft.com')
Exception raises:
Traceback (most recent call last):
File "/home/vovyc/sandbox.py", line 54, in <module>
browser = Edge(options=options, executable_path='/home/vovyc/edge_linux_64bit_88_0_685_3')
File "/home/vovyc/pysilq3/venv/lib/python3.8/site-packages/msedge/selenium_tools/webdriver.py", line 101, in __init__
RemoteWebDriver.__init__(
File "/home/vovyc/pysilq3/venv/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 157, in __init__
self.start_session(capabilities, browser_profile)
File "/home/vovyc/pysilq3/venv/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 252, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "/home/vovyc/pysilq3/venv/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "/home/vovyc/pysilq3/venv/lib/python3.8/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.SessionNotCreatedException: Message: session not created: No matching capabilities found
OS: Ubuntu 20.04.1 LTS 64-bit
Browser: Microsoft Edge Version 88.0.685.3 (Official build) dev (64-bit) - installed via $sudo apt install microsoft-edge-dev
Driver: Linux (latest version: 88.0.685.3) - downloaded from https://msedgewebdriverstorage.blob.core.windows.net/edgewebdriver/88.0.685.3/edgedriver_linux64.zip
selenium==3.141.0
msedge-selenium-tools==3.141.2
Hi @Volodymyr Marchenko , please make sure the path is right and make sure you have installed the MS Edge Selenium tools correctly. Please use the full path to Edge Dev and Edge WebDriver. For example, in Windows the file path should be like this options.binary_location = r"C:\Program Files (x86)\Microsoft\Edge Dev\Application\msedge.exe"
and executable_path = r"D:\webdriver88\msedgedriver.exe"
. I think you also need to use the complete path pointing to Edge and WebDriver in Linux.
I believe i found the solution for this (Ubuntu 18.04).
As the default capabilities are for platfrom:windows, you need to manually set the cap to the Linux platform. i.e:
from msedge.selenium_tools import Edge, EdgeOptions
options = EdgeOptions()
options.binary_location = r'/opt/microsoft/msedge-dev/microsoft-edge-dev'
options.use_chromium = True
options.set_capability("platform", "LINUX")
browser = Edge(options=options, executable_path=r"driver/msedgedriver")
browser.get('https://www.google.com')
Please update if this works for you.
Sincerely,