Closed aarif313 closed 8 months ago
Hello @aarif313! Since version v4.13.0 we no longer support webDriverVersion in settings(except of Opera driver). From now on, we rely on built-in Selenium Manager. It has additional ways of control, including environment variables. We have some logic built over it, you can take a look here. If you still with to use WebDriverManager, you can add the following code to be executed before your test run e.g. in your [SetUp] method before browser navigation:
new DriverManager().SetUpDriver(new ChromeConfig());
Alternatively, you can use Aquality.Selenium v4.12.3 or any previous. But, it's interesting why Selenium Manager is not working for you. Could you please share the Chrome version you are working with?
@aqualityAutomation
Thanks for your reply.
Regarding the version details, I've observed that both on my local machine and the VM, the Chrome version is "Version 122.0.6261.58". They appear to be identical.
The error I've shared occurs only when executing test cases on VM and does not occur when executing on my local machine.
@aqualityAutomation
I changed Aquality.Selenium to [v4.12.3], this giving me below error,
System.Reflection.TargetInvocationException : Exception has been thrown by the target of an invocation. ----> System.ComponentModel.Win32Exception : An error occurred trying to start process 'C:\Users**\selenium\chromedriver\win64\122.0.6261.57\chromedriver.exe' with working directory 'F:\ ** \ ** \ *****-Master-Build\web\bin\Release\net6.0-windows'. Access is denied.
Hi @aarif313 , From my point of view, it looks like a file access issue. Please reassure that the user you are authenticated with on your VM have sufficient permissions to access both working directory (on F drive) and user directory (on C drive). And you can use the latest version of Aquality.Selenium nuget package.
If it doesn't work for you, please try adding the command
new DriverManager().SetUpDriver(new ChromeConfig(), "MatchingBrowser");
to your before tests section (if you have SpecFlow, it could be in BeforeScenario or BeforeFeature hook method).
Hi @mialeska @aqualityAutomation
Updated Aquality.Selenium to latest varsion 4.16.0,Additionally added below lines in [SetUp] section
new DriverManager().SetUpDriver(new ChromeConfig(), "MatchingBrowser");
But NO LUCK.
Still getting below error,
System.Reflection.TargetInvocationException : Exception has been thrown by the target of an invocation. ----> System.InvalidOperationException : session not created: This version of ChromeDriver only supports Chrome version 83 (SessionNotCreated) TearDown : System.Reflection.TargetInvocationException : Exception has been thrown by the target of an invocation. ----> System.InvalidOperationException : session not created: This version of ChromeDriver only supports Chrome version 83 (SessionNotCreated)
FYI, I also tried by installing and uninstalling "WebDriverManager" but nothing changed, still same error.
@aarif313 Have you also resolved directory access issues?
In case of this error, we are logging initial exception on DEBUG level (please see the screenshot below). Could you please share this piece of your log.log file with text "session not created"?
Standard_Console_Output (11).log
@mialeska @aqualityAutomation
Please find attached log file, I don't see much info in log file.
Okay, there is not much that I can see here as well.
I was talking not about console output but log.log file that should be located under
Anyways, for now I can also suggest to try setting the environment variable "SE_DRIVER_VERSION" = "122.0.6261.57" or "SE_DRIVER_VERSION" = "122.0.6261.6901" or "SE_BROWSER_VERSION" = "122" before test execution as a temp workaround, until we find a better solution.
If this would not help as well, another shot would be to install nuget package https://www.nuget.org/packages/Selenium.WebDriver.ChromeDriver/122.0.6261.6901?_src=template
Dear @mialeska / @aqualityAutomation ,
Great news!
I attempted to add the environment variable "SE_DRIVER_VERSION" with the values mentioned above, but unfortunately, this did not help.
Later, I installed Selenium.WebDriver.ChromeDriver, and it successfully resolved the issue.
However, I'm curious, since the Aquality.Selenium package already includes the driver, why do we still need to install Selenium.WebDriver.ChromeDriver separately?
yes, this would be required until your VM issue is resolved
Thanks for your support.
I am trying to execute test cases on VM and getting below error,
System.Reflection.TargetInvocationException : Exception has been thrown by the target of an invocation. ----> System.InvalidOperationException : session not created: This version of ChromeDriver only supports Chrome version 83 (SessionNotCreated) TearDown : System.Reflection.TargetInvocationException : Exception has been thrown by the target of an invocation. ----> System.InvalidOperationException : session not created: This version of ChromeDriver only supports Chrome version 83 (SessionNotCreated)
Below are configuration of my setting file for Chrome,
As I have already set webDriverVersion value to MatchingBrowser not sure why this issue is still happening.
Additionally below are Nuget packages I am using, Aquality.Selenium 4.14.1 NUnit 3.13.3 NUnit3TestAdapter 4.5.0
Requesting your kind support.