-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
Open
Labels
A-needs-triagingA Selenium member will evaluate this soon!A Selenium member will evaluate this soon!C-dotnet.NET Bindings.NET BindingsI-defectSomething is not working as intendedSomething is not working as intendedJ-staleApplied to issues that become stale, and eventually closed.Applied to issues that become stale, and eventually closed.
Milestone
Description
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 :
Instance = new ChromeDriver( chromeOptions);
Instance.Quit() // is really quick
But, if we instanciate the driver with this constructor :
Instance2 = new ChromeDriver(ChromeDriverService.CreateDefaultService(Environment.CurrentDirectory), chromeOptions);
Instance2.Quit() ; // Quitting takes a lot of time (over 10 seconds)
How can we reproduce the issue?
Instanciate a webdriver like this
var chromeOptions = new ChromeOptions();
if (headLess)
chromeOptions.AddArgument("headless");
Instance2 = new ChromeDriver(ChromeDriverService.CreateDefaultService(Environment.CurrentDirectory), chromeOptions);
Relevant log output
I've turned on logging as following :
Log.SetLevel(LogEventLevel.Trace);
Log.Handlers.Add(new FileLogHandler("C:\\temp\\log_selenium_itself.txt"));
Log.SetLevel(typeof(ChromeDriverService), LogEventLevel.Trace);
Log.SetLevel(typeof(SeleniumManager), LogEventLevel.Trace);
Log.SetLevel(typeof(ChromeDriver), LogEventLevel.Trace);
The only relevant-like info I saw when comparing both constructors :
With ChromeDriverService it starts with the two following lines :
Instance2 = new ChromeDriver(ChromeDriverService.CreateDefaultService(Environment.CurrentDirectory), chromeOptions);
-----
2024-10-21 13:20:53.549 DEBUG HttpCommandExecutor: Executing command: []: newSession {"capabilities":{"firstMatch":[{"browserName":"chrome","goog:chromeOptions":{"args":["headless","ignore-certificate-errors","start-maximized"]}}]}}
2024-10-21 13:20:53.583 TRACE HttpCommandExecutor: >> Method: POST, RequestUri: 'http://localhost:52810/session', Version: 1.1, Content: System.Net.Http.ByteArrayContent, Headers:
Instance = new ChromeDriver( chromeOptions); starts with 4 lines instead
-----------------------------------------------
2024-10-21 13:21:59.163 TRACE SeleniumManager: Driver path: C:\Users\cav001\.cache\selenium\chromedriver\win64\130.0.6723.58\chromedriver.exe
2024-10-21 13:21:59.165 TRACE SeleniumManager: Browser path: C:\Program Files\Google\Chrome\Application\chrome.exe
2024-10-21 13:21:59.338 DEBUG HttpCommandExecutor: Executing command: []: newSession {"capabilities":{"firstMatch":[{"browserName":"chrome","goog:chromeOptions":{"args":["headless","ignore-certificate-errors","start-maximized"],"binary":"C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe"}}]}}
2024-10-21 13:21:59.360 TRACE HttpCommandExecutor: >> Method: POST, RequestUri: 'http://localhost:52851/session', Version: 1.1, Content: System.Net.Http.ByteArrayContent, Headers:
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
Metadata
Metadata
Assignees
Labels
A-needs-triagingA Selenium member will evaluate this soon!A Selenium member will evaluate this soon!C-dotnet.NET Bindings.NET BindingsI-defectSomething is not working as intendedSomething is not working as intendedJ-staleApplied to issues that become stale, and eventually closed.Applied to issues that become stale, and eventually closed.