-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[dotnet] Unify protected and internal Execute methods #15233
base: trunk
Are you sure you want to change the base?
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
@@ -617,7 +594,7 @@ protected virtual Response Execute(string driverCommandToExecute, | |||
/// <param name="driverCommandToExecute">A <see cref="DriverCommand"/> value representing the command to execute.</param> | |||
/// <param name="parameters">A <see cref="Dictionary{K, V}"/> containing the names and values of the parameters of the command.</param> | |||
/// <returns>A <see cref="Response"/> containing information about the success or failure of the command and any data returned by the command.</returns> | |||
protected virtual async Task<Response> ExecuteAsync(string driverCommandToExecute, Dictionary<string, object> parameters) | |||
protected internal virtual async Task<Response> ExecuteAsync(string driverCommandToExecute, Dictionary<string, object> parameters) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't trust.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I validated it myself (in the screenshot) and the docs verify this. It's safe!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
compile time or at binary level?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm, I'm not sure about binary compatibility. Let me do more research.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I asked the .NET team, and they said it is not a source or a binary breaking change
@@ -617,7 +594,7 @@ protected virtual Response Execute(string driverCommandToExecute, | |||
/// <param name="driverCommandToExecute">A <see cref="DriverCommand"/> value representing the command to execute.</param> | |||
/// <param name="parameters">A <see cref="Dictionary{K, V}"/> containing the names and values of the parameters of the command.</param> | |||
/// <returns>A <see cref="Response"/> containing information about the success or failure of the command and any data returned by the command.</returns> | |||
protected virtual async Task<Response> ExecuteAsync(string driverCommandToExecute, Dictionary<string, object> parameters) | |||
protected internal virtual async Task<Response> ExecuteAsync(string driverCommandToExecute, Dictionary<string, object> parameters) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't trust.
User description
Thanks for contributing to Selenium!
A PR well described will help maintainers to quickly review and merge it
Before submitting your PR, please check our contributing guidelines.
Avoid large PRs, help reviewers by making them as simple and short as possible.
protected
+internal
->protected internal
Motivation and Context
Less overloads, shorter stack traces, less maintenance.
Types of changes
Checklist
PR Type
Enhancement, Bug fix
Description
Unified
InternalExecute
andExecute
methods into a singleprotected internal
method.Replaced all occurrences of
InternalExecute
withExecute
across multiple classes.Added null checks for constructor parameters in
HttpCommandInfo
.Simplified and streamlined method calls for better maintainability and reduced stack traces.
Changes walkthrough 📝
10 files
Replaced `InternalExecute` with `Execute` in alert handling.
Replaced `InternalExecute` with `Execute` in cookie management.
Replaced `InternalExecute` with `Execute` in log retrieval.
Replaced
InternalExecuteAsync
withExecuteAsync
in navigation methods.Replaced
InternalExecute
withExecute
in shadow DOM element handling.Replaced
InternalExecute
withExecute
in frame and window switching.Replaced `InternalExecute` with `Execute` in timeout management.
Unified
InternalExecute
andExecute
methods into a singleprotected
internal
method.Replaced
InternalExecute
withExecute
in element-specific commands.Replaced `InternalExecute` with `Execute` in window management.
1 files
Added null checks for constructor parameters.