microsoft / EasyRepro

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

AzureDevOps - Build pipeline - Easyrepro - EdgeDriver - DevToolsActivePort file doesn't exist. #1119

Open birvag opened 3 years ago

birvag commented 3 years ago

I have AzureDevOps Build pipeline to run test cases written using Easyrepro and we are using EdgeDriver. its throwing below exception in VsTest Task : NOTE: locally code runs well in Visual studio.

OpenQA.Selenium.WebDriverException: unknown error: DevToolsActivePort file doesn't exist Stack Trace: at OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse) at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary2 parameters) at OpenQA.Selenium.Remote.RemoteWebDriver.StartSession(ICapabilities desiredCapabilities) at OpenQA.Selenium.Remote.RemoteWebDriver..ctor(ICommandExecutor commandExecutor, ICapabilities desiredCapabilities) at OpenQA.Selenium.Edge.EdgeDriver..ctor(EdgeDriverService service, EdgeOptions options, TimeSpan commandTimeout) at Microsoft.Dynamics365.UIAutomation.Browser.BrowserDriverFactory.CreateWebDriver(BrowserOptions options) in D:\a\1\s\Microsoft.Dynamics365.UIAutomation.Browser\BrowserDriverFactory.cs:line 42 at Microsoft.Dynamics365.UIAutomation.Browser.InteractiveBrowser.get_Driver() in D:\a\1\s\Microsoft.Dynamics365.UIAutomation.Browser\InteractiveBrowser.cs:line 85 at Microsoft.Dynamics365.UIAutomation.Browser.BrowserPage.Execute[TResult,T1,T2,T3,T4,T5](BrowserCommandOptions options, Func7 delegate, T1 p1, T2 p2, T3 p3, T4 p4, T5 p5) in D:\a\1\s\Microsoft.Dynamics365.UIAutomation.Browser\BrowserPage.cs:line 242 at Microsoft.Dynamics365.UIAutomation.Api.UCI.WebClient.Login(Uri orgUri, SecureString username, SecureString password, SecureString mfaSecretKey, Action`1 redirectAction) in D:\a\1\s\Microsoft.Dynamics365.UIAutomation.Api.UCI\WebClient.cs:line 112 at Microsoft.Dynamics365.UIAutomation.Api.UCI.OnlineLogin.Login(Uri orgUrl, SecureString username, SecureString password, SecureString mfaSecretKey) in D:\a\1\s\Microsoft.Dynamics365.UIAutomation.Api.UCI\Elements\OnlineLogin.cs:line 38

below is the code where its failing: D:\a\1\s\Microsoft.Dynamics365.UIAutomation.Browser\BrowserDriverFactory.cs:line 42 case BrowserType.Edge: var edgeService = EdgeDriverService.CreateDefaultService(options.DriversPath); edgeService.HideCommandPromptWindow = options.HideDiagnosticWindow; driver = new EdgeDriver(edgeService,options.ToEdge(), TimeSpan.FromMinutes(20)); break;

Can you please help to resolve this issue?

Shakevg commented 3 years ago

@birvag What type of Azure Agent are you using for running tests? If it is an Azure Hosted agent then EdgeDriver will not work on it because EasyRepro does not support now Microsoft Edge Browser, based on Chromium

Shakevg commented 3 years ago

@birvag You can also try this https://github.com/microsoft/EasyRepro/issues/927#issuecomment-810259048