Reputation: 13
Microsoft recently released a blog where they talk about the new Edge browser coming out and how to test it with Selenium: https://blogs.windows.com/msedgedev/2019/11/04/edge-chromium-release-candidate-get-ready/ However the example is using C#, which uses different libraries than Python. I'm simply trying to get Selenium to open a webpage. Edge Beta version I have is 79.0.309.54
Here's what I've tried:
browser_options = Options()
browser_options.binary_location = '{PATH_TO_MISCROSOFT_EDGE_BETA_BINARY}'
driver = Chrome(executible_path='{PATH_TO_EDGE_DRIVER}', options=browser_options)
driver.get('https://blogs.windows.com')
But that results in:
session not created: from tab crashed (Session info:Microsoft Edge=79.0.309.54)
I've also tried:
driver = Edge(executible_path='{PATH_TO_EDGE_DRIVER}')
driver.get('https://blogs.windows.com')
But that results in:
session not created: No matching capabilities found
Upvotes: 1
Views: 9532
Reputation: 31
My "Edge Chromimum" is the "beta 80.0.361.53"; I downloaded the related WebDriver from Microsoft at https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/ which I stored in a folder that I added permanently to PATH (and by the way, I also downloaded the Internet Explorer WebDriver from https://selenium.dev/downloads/ to run parallel IE / Edge tests).
I use the Python binding which is he latest stable version at time of writing "3.141.0".
The Edge binary (msedge.exe) was installed in non-Administrator mode (this was possible but not anymore with final version) and is located in "C:\Users\\AppData\Local\Microsoft\Edge Beta\Application" and as this location is not on the PATH, I created a small .cmd wrapper to launch my Python test code (I did not want to add this extra folder on the PATH permanently) adding temporarily this folder to PATH.
The very first example proposed by selenium requires one small modification as illustrated below:
from selenium import webdriver
# Using Internet Explorer
# browser = webdriver.Ie()
# Using Edge Chromium
# needs "msedgedriver.exe" otherwize expects "MicrosoftWebDriver.exe"
browser = webdriver.Edge("msedgedriver.exe")
browser.get('http://seleniumhq.org/')
It then works very well for me, for both IE and Edge Chromium - snapshot below from Edge Chromium:
Upvotes: 2