microsoft / EasyRepro

Automated UI testing API for Dynamics 365
MIT License
520 stars 288 forks source link

Edge Browser Compatability #927

Open mazma26 opened 4 years ago

mazma26 commented 4 years ago

Question

Morning,

It's listed that Edge is not currently supported. Can you advise if it's on your roadmap to add this support and what the bugs are?

tipsey commented 3 years ago

Had to get this working with Latest Edge Chromium Edition, could never get it to work with Old Edge. Had to download driver that matches OS Version.

WebDriver downloads: https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/ Add Microsoft.Edge.SeleniumTools v3.14.2 (or greater) in Manage Packages for Solution Modified: BrowserDriverFactory.cs

//using OpenQA.Selenium.Edge; <--Old Edge using Microsoft.Edge.SeleniumTools; //Add below to get path to driver which is in a Folder named Drivers in Solution using System.IO; using System.Reflection;

case BrowserType.Edge: //var edgeService = EdgeDriverService.CreateDefaultService(); //edgeService.HideCommandPromptWindow = options.HideDiagnosticWindow; // driver = new EdgeDriver(edgeService,options.ToEdge(), TimeSpan.FromMinutes(20)); string path = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), @"Drivers"); var Edgeoptions = new EdgeOptions(); //Edgeoptions.AddArguments("profile-directory=Profile 1"); //Use this if no security profile created Edgeoptions.AddArguments("user-data-dir=C:\Users\Username\AppData\Local\Microsoft\Edge\User Data\Profile 1"); Edgeoptions.UseChromium = true;
driver = new EdgeDriver(path, Edgeoptions, TimeSpan.FromMinutes(20)); break;