-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP [dotnet] Reusable DriverService
instance by Drivers
#14662
base: trunk
Are you sure you want to change the base?
WIP [dotnet] Reusable DriverService
instance by Drivers
#14662
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
To move further we have to decide:
@YevgeniyShunevych your input is appreciated here. |
User description
DriverService
instance seems to be reusable by Drivers, but in fact no. As soon asQuit
command is handled by Drivers, then underlyingDriverService
is disposed silently.https://github.com/SeleniumHQ/selenium/blame/215e20b139f9af0c2db76b800472daed0633c73c/dotnet/src/webdriver/Remote/DriverServiceCommandExecutor.cs#L128 - this is bad design.
Description
Motivation and Context
Fixes #14624 and #14633
Types of changes
Checklist
PR Type
enhancement
Description
disposeService
parameter across various driver classes to control the disposal of driver services.disposeService
parameter.DriverServiceCommandExecutor
class and replaced its functionality with direct service management.WebDriver
class to ensure proper resource management.Changes walkthrough 📝
9 files
ChromeDriver.cs
Add disposeService parameter to ChromeDriver constructors
dotnet/src/webdriver/Chrome/ChromeDriver.cs
disposeService
parameter to constructors.disposeService
.ChromiumDriver.cs
Enhance ChromiumDriver with service disposal control
dotnet/src/webdriver/Chromium/ChromiumDriver.cs
disposeDriverService
field.EdgeDriver.cs
Update EdgeDriver constructor for service disposal
dotnet/src/webdriver/Edge/EdgeDriver.cs
disposeService
parameter.FirefoxDriver.cs
Update FirefoxDriver to start service in executor
dotnet/src/webdriver/Firefox/FirefoxDriver.cs
InternetExplorerDriver.cs
Modify InternetExplorerDriver to start service in executor
dotnet/src/webdriver/IE/InternetExplorerDriver.cs
DriverServiceCommandExecutor.cs
Remove DriverServiceCommandExecutor class
dotnet/src/webdriver/Remote/DriverServiceCommandExecutor.cs
DriverServiceCommandExecutor
class.SafariDriver.cs
Update SafariDriver to start service in executor
dotnet/src/webdriver/Safari/SafariDriver.cs
WebDriver.cs
Ensure executor disposal in WebDriver class
dotnet/src/webdriver/WebDriver.cs
Dispose
method.DriverFactory.cs
Modify DriverFactory to pass service in driver instantiation
dotnet/test/common/Environment/DriverFactory.cs