I\'m using Microsoft Edge Webdriver (Chromium) with Python3 in my script.
The webdriver configuration is as follows:
driveroptions = Options()
driver
I tried the capabilities like below, it worked, you can have a try:
{
"desiredCapabilities": {
"nativeEvents": false,
"browserName": "chrome",
"version": "",
"platform": "ANY",
"javascriptEnabled": true,
...
}
}
Browser and webdriver must match the first 3 tuples in version number.
In chrome there is a version check that tells you if browser and webdriver does not match. msedge gives the more diffuse: No matching capabilities found
I'm using the chocolately Microsoft Edge Insider - Beta
which installse the msedge browser, it is currently at version 79.0.309.65.
it means I can't use the latest 79.x msedgedriver which currently is at 79.0.313.0, I have to use the 79.0.309.x.
I've implemented a simple test in my selenium driver that check this before starting.
Finally solved my question.
# using edge directly, since you can see 'selenium.webdriver.chromium.webdriver' used in site-packages\selenium\webdriver\edge\webdriver.py
from selenium import webdriver
from selenium.webdriver.edge.options import Options
from selenium.webdriver.edge.service import Service
from selenium.webdriver.edge.webdriver import WebDriver
...
...
driveroptions = Options()
# remember to set use_chromium
driveroptions.use_chromium = True
driveroptions.add_argument('--start-maximized')
driveroptions.binary_location = env_programfiles_x86 + "\\Microsoft\\Edge\\Application\\msedge.exe"
service = Service(executable_path="msedgedriver.exe")
driver = webdriver.Edge(options=driveroptions, service=service)
driver.set_page_load_timeout(40)
driver.get(page_url)