[dotnet] [bidi] Add UserContext in event args#17100
[dotnet] [bidi] Add UserContext in event args#17100nvborisenko merged 2 commits intoSeleniumHQ:trunkfrom
Conversation
PR TypeEnhancement Description
|
| Relevant files | |||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Enhancement | 10 files
|
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:
|
|||||||||||||
There was a problem hiding this comment.
Pull request overview
This pull request adds UserContext support across various BiDi event arguments and information classes to improve context-awareness throughout the WebDriver BiDi implementation. The changes track an optional W3C WebDriver BiDi specification evolution (issue #1071).
Changes:
- Added
UserContextproperty to Script module classes (Source, WindowRealmInfo) - Added
UserContextparameter to BrowsingContext event args (UserPromptOpened, UserPromptClosed, NavigationInfo, HistoryUpdatedEventArgs) - Added
UserContextto Input module (FileDialogInfo) - Added
UserContextto CreateCommand result - Registered BrowserUserContextConverter in LogModule and InputModule for JSON deserialization
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| dotnet/src/webdriver/BiDi/Script/Source.cs | Added optional UserContext property as init-only |
| dotnet/src/webdriver/BiDi/Script/RealmInfo.cs | Added optional UserContext property to WindowRealmInfo |
| dotnet/src/webdriver/BiDi/Log/LogModule.cs | Registered BrowserUserContextConverter for deserialization |
| dotnet/src/webdriver/BiDi/Input/InputModule.cs | Registered BrowserUserContextConverter for deserialization |
| dotnet/src/webdriver/BiDi/Input/FileDialogInfo.cs | Added UserContext as constructor parameter (breaking change) |
| dotnet/src/webdriver/BiDi/BrowsingContext/UserPromptOpenedEventArgs.cs | Added UserContext and reordered parameters (breaking change) |
| dotnet/src/webdriver/BiDi/BrowsingContext/UserPromptClosedEventArgs.cs | Added UserContext and Type parameters mid-list (breaking change) |
| dotnet/src/webdriver/BiDi/BrowsingContext/NavigationInfo.cs | Added UserContext at end of parameter list |
| dotnet/src/webdriver/BiDi/BrowsingContext/HistoryUpdatedEventArgs.cs | Added UserContext at end of parameter list |
| dotnet/src/webdriver/BiDi/BrowsingContext/CreateCommand.cs | Added UserContext to CreateResult |
Adds support for tracking and handling
UserContextinformation across various BiDi (Browser Automation) event argument and info classes. The main focus is on ensuring that user context data is available in relevant event records, improving context-awareness throughout the WebDriver BiDi implementation.💡 Additional Considerations
Optional for now, tracking w3c/webdriver-bidi#1071
🔄 Types of changes