microsoft / EasyRepro

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

System.InvalidOperationException: session not created: This version of ChromeDriver only supports Chrome version 83 #957

Open gurudokku opened 4 years ago

gurudokku commented 4 years ago

EasyRepro Version

UCI or Classic Web

Online or On Premise

Browser

Describe the bug
I have downloaded the EasyRepro from github repository and tried building. It was not building, I have updated Dynamics365.UIAutomation.Api (version 9.1) references from NuGet. I tried running UCI sample test case and got the below error with chrome driver compatibility.

Test Name: TestCreateAccount Test FullName: Microsoft.Dynamics365.UIAutomation.Sample.UCI.Lab_TestsBase_CreateApp_NavigateToSameArea_InAllTests.TestCreateAccount Test Source: C:\GitHub\EasyRepro\Microsoft.Dynamics365.UIAutomation.Sample\UCI\Labs\TestsBase\7_Lab_TestsBase_CreateApp_NavigateToSameArea_InAllTests.cs : line 19 Test Outcome: Failed Test Duration: 0:00:01.4301121

Result StackTrace:
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.Chrome.ChromeDriver..ctor(ChromeDriverService service, ChromeOptions options, TimeSpan commandTimeout) at OpenQA.Selenium.Chrome.ChromeDriver..ctor(ChromeDriverService service, ChromeOptions options) at Microsoft.Dynamics365.UIAutomation.Browser.BrowserDriverFactory.CreateWebDriver(BrowserOptions options) at Microsoft.Dynamics365.UIAutomation.Browser.InteractiveBrowser.get_Driver() 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) at Microsoft.Dynamics365.UIAutomation.Api.UCI.WebClient.Login(Uri orgUri, SecureString username, SecureString password, SecureString mfaSecretKey, Action`1 redirectAction) at Microsoft.Dynamics365.UIAutomation.Api.UCI.OnlineLogin.Login(Uri orgUrl, SecureString username, SecureString password, SecureString mfaSecretKey) at Microsoft.Dynamics365.UIAutomation.Sample.UCI.TestsBase.CreateApp(BrowserOptions options) in C:\GitHub\EasyRepro\Microsoft.Dynamics365.UIAutomation.Sample\UCI\Labs\TestsBase\TestsBase.cs:line 64 at Microsoft.Dynamics365.UIAutomation.Sample.UCI.TestsBase.InitTest() in C:\GitHub\EasyRepro\Microsoft.Dynamics365.UIAutomation.Sample\UCI\Labs\TestsBase\TestsBase.cs:line 45 at Microsoft.Dynamics365.UIAutomation.Sample.UCI.Lab_TestsBase_CreateApp_NavigateToSameArea_InAllTests.InitTest() in C:\GitHub\EasyRepro\Microsoft.Dynamics365.UIAutomation.Sample\UCI\Labs\TestsBase\7_Lab_TestsBase_CreateApp_NavigateToSameArea_InAllTests.cs:line 9 Result Message: Initialization method Microsoft.Dynamics365.UIAutomation.Sample.UCI.Lab_TestsBase_CreateApp_NavigateToSameArea_InAllTests.InitTest threw exception. System.InvalidOperationException: System.InvalidOperationException: session not created: This version of ChromeDriver only supports Chrome version 83 (SessionNotCreated).

Code to reproduce

TYLEROL commented 4 years ago

@gurudokku - Which version of Chrome browser are you testing with locally? I assume something higher than v83?

You'll need to make sure your local version of the Chrome WebDriver matches the Chrome browser version you're using.

gurudokku commented 4 years ago

@gurudokku - Which version of Chrome browser are you testing with locally? I assume something higher than v83?

You'll need to make sure your local version of the Chrome WebDriver matches the Chrome browser version you're using.

Thanks @TYLEROL for the reply. I have Chrome browser version V84 and also downloaded the same version of the chrome WebDriver.

Interestingly EasyRepro worked with IE on the same machine but not with Chrome.

QniJ commented 6 months ago

@gurudokku is the issue solved. Im having the same issue. and don't have any lead on how to solve it.
@TYLEROL can you help me out please

Shakevg commented 6 months ago

QniJ https://stackoverflow.com/a/71859682/8951897