Open CarlVerret opened 1 month ago
@CarlVerret, thank you for creating this issue. We will troubleshoot it as soon as we can.
Triage this issue by using labels.
If information is missing, add a helpful comment and then I-issue-template
label.
If the issue is a question, add the I-question
label.
If the issue is valid but there is no time to troubleshoot it, consider adding the help wanted
label.
If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C),
add the applicable G-*
label, and it will provide the correct link and auto-close the
issue.
After troubleshooting the issue, please add the R-awaiting answer
label.
Thank you!
@CarlVerret when you use:
Instance = new ChromeDriver( chromeOptions);
Then Selenium Manager is used to automatically manage chromedriver.exe
binary for you. Most likely it is downloading recent/latest version (v130 based on logs you provided). And seems it works smoothly.
But when you use:
Instance2 = new ChromeDriver(ChromeDriverService.CreateDefaultService(Environment.CurrentDirectory), chromeOptions);
Then chromedriver.exe
is taken from your Environment.CurrentDirectory
, which is not managed by Selenium. Somebody else (or you) put this binary, and seems this binary is "outdated" or not "compatible" with existing chrome browser.
Thanks for your quick feedback. As performance is a major concern for us, we've put the driver initialization in the Fixture of our test base class. Is there any advantage to take the ChromeDriverService constructor approach ? It feels that for a couple hundreds of tests, it was quicker with the driver service method. (the right binary version was ensured by a nuget package (nupkg-selenium-webdriver-chromedriver)
ChromeDriverService
across tests, which is similar to https://github.com/SeleniumHQ/selenium/issues/14624@CarlVerret I believe this functionality worked for you well, please remind in which Selenium version.
i'll try to come back with numbers. as far as I remember, it was working with this version :
Maybe a bit after that.
I wonder what's the typical scenario to use ChromeDriverService ctor ?
You are doing it right in my personal opinion. And Selenium Manager is not bad, it cashes output. Ps: you missed the version In your previous message.
You are doing it right in my personal opinion. And Selenium Manager is not bad, it cashes output. Ps: you missed the version In your previous message.
that's strange. I was certain to have put xml tags containing nuget versions ...
I'm pretty sure these bundle of version were working fine.
<PackageReference Include="Selenium.Support" Version="4.21.0" />
<PackageReference Include="Selenium.WebDriver" Version="4.21.0" />
<PackageReference Include="Selenium.WebDriver.ChromeDriver" Version="125.0.6422.6000" />
I couldn't reproduce the issue, my setup is:
var chromeOptions = new ChromeOptions();
var Instance2 = new ChromeDriver(ChromeDriverService.CreateDefaultService(Environment.CurrentDirectory), chromeOptions);
Instance2.Quit();
<PackageReference Include="Selenium.WebDriver" Version="4.25.0" />
<PackageReference Include="Selenium.WebDriver.ChromeDriver" Version="130.0.6723.5800" />
Quit () takes a long time when driver instance is created with ChromeDriverService
@CarlVerret and returning back to initial issue:
What happened?
We've been experiencing something quite strange with Quit function of webdriver instanciated with ChromeDirverService since an upgrade to latest version:
let's say we create an instance like this :
But, if we instanciate the driver with this constructor :
How can we reproduce the issue?
Relevant log output
Operating System
Windows 10 - aspnet core
Selenium version
4.25.0
What are the browser(s) and version(s) where you see this issue?
Chrome
What are the browser driver(s) and version(s) where you see this issue?
Selenium.WebDriver.ChromeDriver 130.0.6723.5800
Are you using Selenium Grid?
none