Forum Discussion
mloughery
May 13, 2020Copper Contributor
EdgeDriver (v81) no longer supports ability to pass in DriverService as a parameter
Hello
Since Edge has been upgraded to v80, it has introduced a "breaking change" to our automation. This is documented by Microsoft in the attached link. Ideally I would have liked to remain on Selenium 3 and use the edge-selenium-tools but given that my framework is java based that was not an option.
To resolve this, then, I updated to Selenium 4 (alpha 5), which supports v81 of Edge Chromium, but only to an extent.
The ability to pass in ChromiumEdgeDriverService/EdgeDriverService (not sure which I should even be using now) as a parameter to the EdgeDriver WebDriver has been taken away. This is something I rely on to implement a workaround for downloads in headless mode and so I am eager to restore that functionality ASAP.
I am not sure if this is something I should be reporting to SeleniumHQ as an improvement or regression, or something I should be raising with yourselves but I am looking for some guidance on what I should do in this instance.
Thank you
Mark
mloughery Look like some things are missing from the Java language bindings. We're going to take a look at getting them updated in the next couple weeks.
Thanks so much for taking the time to post this here.
-John
- johnjansen
Microsoft
mloughery reporting issues like this here is perfectly fine. If the issue needs to go through Selenium, we can help direct it over there, but for something that is specific to the MSEdgeDriver, I work on that team, so I can likely help.
In this case, have you seen this article we wrote? https://docs.microsoft.com/en-us/microsoft-edge/webdriver-chromium?tabs=c-sharp
I think it addresses your issue with the EdgeDriverService:
using (var service = EdgeDriverService.CreateChromiumService()) { service.UseVerboseLogging = true; var driver = new EdgeDriver(service); }
Does that help?
-John
- mlougheryCopper Contributor
Hi johnjansen thanks for your quick response.
Yeah I actually linked that article in my question ("breaking change") but I did't find anything to help there. I am using Java with Selenium so that C# code isn't a great deal of help to me. I also checked the javadocs for the EdgeDriverService and ChromiumEdgeDriverService classes and there is no CreateChromiumService method, so I think this issue is very specific to Java.
To clarify a bit more about what exactly I want, below is what I use in Chrome - it is working fine:
ChromeDriverService chromeDriverService = ChromeDriverService.createDefaultService();
driver = new ChromeDriver(chromeDriverService,new ChromeOptions())And this is what I want to do in Edge Chromium - this results in error as the constructor does not exist for these parameters:
EdgeDriverService edgeDriverService = EdgeDriverService.createDefaultService();
driver = new EdgeDriver(edgeDriverService,new EdgeOptions());p.s. It's exactly the same for ChromiumEdgeDriverService
Hope that all makes sense.
Thanks,
Mark
- johnjansen
Microsoft
mloughery Look like some things are missing from the Java language bindings. We're going to take a look at getting them updated in the next couple weeks.
Thanks so much for taking the time to post this here.
-John