[dotnet] [bidi] Simplify context aware command options#16954
[dotnet] [bidi] Simplify context aware command options#16954nvborisenko merged 4 commits intoSeleniumHQ:trunkfrom
Conversation
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
|||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
||||||||||||||||
RenderMichael
left a comment
There was a problem hiding this comment.
These changes look good. I left one comment, not blocking the PR, about taking these changes even further.
User description
💥 What does this PR do?
BrowsingContext*OptionstoContext*OptionsTimeoutcommand property🔄 Types of changes
PR Type
Enhancement, Bug fix
Description
Rename
BrowsingContext*OptionstoContext*Optionsfor consistencyConvert context options from records to classes inheriting
CommandOptionsPropagate
Timeoutproperty from context options to command optionsAlign context-aware command options with parent class structure
Diagram Walkthrough
File Walkthrough
BrowsingContext.cs
Update GetTreeAsync method signaturedotnet/src/webdriver/BiDi/BrowsingContext/BrowsingContext.cs
ContextGetTreeOptionsinstead ofBrowsingContextGetTreeOptionsBrowsingContextNetworkModule.cs
Update network module method signaturesdotnet/src/webdriver/BiDi/BrowsingContext/BrowsingContextNetworkModule.cs
AddDataCollectorAsyncmethod to useContextAddDataCollectorOptionsSetCacheBehaviorAsyncmethod to useContextSetCacheBehaviorOptionsBrowsingContextScriptModule.cs
Update script module method signaturedotnet/src/webdriver/BiDi/BrowsingContext/BrowsingContextScriptModule.cs
AddPreloadScriptAsyncmethod to useContextAddPreloadScriptOptionsGetTreeCommand.cs
Refactor GetTreeOptions and ContextGetTreeOptionsdotnet/src/webdriver/BiDi/BrowsingContext/GetTreeCommand.cs
GetTreeOptionsto use primary constructorBrowsingContextGetTreeOptionstoContextGetTreeOptionsandchange from record to class inheriting
CommandOptionsTimeoutproperty propagation from context optionsAddDataCollectorCommand.cs
Refactor AddDataCollectorOptions and ContextAddDataCollectorOptionsdotnet/src/webdriver/BiDi/Network/AddDataCollectorCommand.cs
sealedmodifier toAddDataCollectorOptionsBrowsingContextAddDataCollectorOptionstoContextAddDataCollectorOptionsand change from class to sealed classinheriting
CommandOptionsTimeoutproperty propagation from context optionsAddInterceptCommand.cs
Refactor AddInterceptOptions and ContextAddInterceptOptionsdotnet/src/webdriver/BiDi/Network/AddInterceptCommand.cs
sealedmodifier toAddInterceptOptionsBrowsingContextAddInterceptOptionstoContextAddInterceptOptionsand change from record to class inheritingCommandOptionsTimeoutproperty propagation from context optionsSetCacheBehaviorCommand.cs
Refactor SetCacheBehaviorOptions and ContextSetCacheBehaviorOptionsdotnet/src/webdriver/BiDi/Network/SetCacheBehaviorCommand.cs
BrowsingContextSetCacheBehaviorOptionstoContextSetCacheBehaviorOptionsand change from record to sealed classinheriting
CommandOptionsTimeoutproperty propagation from context optionsAddPreloadScriptCommand.cs
Refactor AddPreloadScriptOptions and ContextAddPreloadScriptOptionsdotnet/src/webdriver/BiDi/Script/AddPreloadScriptCommand.cs
AddPreloadScriptOptionsto use primary constructorBrowsingContextAddPreloadScriptOptionstoContextAddPreloadScriptOptionsand change from record to sealed classinheriting
CommandOptionsTimeoutproperty propagation from context options