You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Code Complexity The BrowsingContextModule class contains a large number of methods and responsibilities. Consider breaking it down into smaller, more focused classes to improve maintainability and readability.
Error Handling The error handling in the ReceiveMessagesAsync method could be improved. Consider adding more specific exception handling and logging to better diagnose and handle potential issues.
Type Conversion The ConvertTo method uses a switch statement for type conversion. This approach might not be extensible enough for future types. Consider implementing a more flexible conversion strategy.
Add error handling in DisposeAsync to ensure robust resource cleanup
Implement error handling for DisposeAsync to manage exceptions that might occur during the disposal process, ensuring all resources are cleaned up properly.
-await EndAsync().ConfigureAwait(false);+try+{+ await EndAsync().ConfigureAwait(false);+}+catch (Exception ex)+{+ // Log the exception or handle it accordingly+}
Apply this suggestion
Suggestion importance[1-10]: 10
Why: Implementing error handling in DisposeAsync is critical for ensuring that all resources are cleaned up properly, even if an exception occurs, thus improving the robustness of the code.
10
Add exception handling for the command execution in the 'CreateAsync' method
In the CreateAsync method, consider handling exceptions that may occur during the execution of Broker.ExecuteCommandAsync. This can improve the robustness of the method by allowing it to gracefully handle scenarios where the command execution fails.
-var createResult = await Broker.ExecuteCommandAsync<CreateResult>(new CreateCommand(@params), options).ConfigureAwait(false);+CreateResult createResult;+try+{+ createResult = await Broker.ExecuteCommandAsync<CreateResult>(new CreateCommand(@params), options).ConfigureAwait(false);+}+catch (Exception ex)+{+ // Handle exception (e.g., log the error, modify the response)+ throw new InvalidOperationException("Failed to create browsing context.", ex);+}
Apply this suggestion
Suggestion importance[1-10]: 8
Why: Adding exception handling enhances the robustness of the method by allowing it to handle failures gracefully. This is a valuable improvement for error management.
8
Bug fix
Correct the syntax for initializing collections
Replace the array initializer with a proper collection initializer to avoid syntax errors.
public static KeySourceActions Press(string text)
+{+ if (text == null) throw new ArgumentNullException(nameof(text));
Apply this suggestion
Suggestion importance[1-10]: 10
Why: Adding null checks is crucial to prevent potential runtime exceptions, making this a highly valuable suggestion for improving code robustness.
10
Enhancement
Add validation for the 'url' parameter to ensure it is a well-formed URL
Consider validating the url parameter in the NavigateAsync method to ensure it is a well-formed URL before proceeding with the navigation command. This can prevent potential errors or security issues related to malformed URLs.
+if (!Uri.IsWellFormedUriString(url, UriKind.Absolute))+ throw new ArgumentException("The URL provided is not a valid absolute URL.", nameof(url));
var @params = new NavigateCommandParameters(context, url);
Apply this suggestion
Suggestion importance[1-10]: 9
Why: This suggestion adds a crucial validation step to ensure the URL is well-formed, which can prevent potential runtime errors and security issues. It is a significant improvement for robustness and security.
9
Improve URL validation by using Uri.TryCreate
Consider using Uri.TryCreate instead of new Uri to handle potential exceptions from invalid URLs gracefully.
-var uri = new Uri(url);+if (!Uri.TryCreate(url, UriKind.Absolute, out var uri))+{+ throw new ArgumentException("Invalid URL provided.", nameof(url));+}
Apply this suggestion
Suggestion importance[1-10]: 9
Why: This suggestion improves the robustness of the code by handling potential exceptions from invalid URLs gracefully, which is crucial for preventing runtime errors.
9
✅ Use null instead of default for clearer default parameter valuesSuggestion Impact:The commit changed the default parameter value of duration in the Pause method to null, which aligns with the suggestion. However, it also changed the type from ulong? to long?.
code diff:
- public KeySourceActions Pause(ulong? duration = default)+ public KeySourceActions Pause(long? duration = null)
Replace the default parameter value of duration in Pause method with null instead of default to make the intent clearer and align with common C# practices.
Why: This suggestion enhances code clarity and aligns with common C# practices, although it is a minor improvement.
7
Implement a timeout mechanism for the 'ReloadAsync' method to handle long-running reloads
In the ReloadAsync method, consider adding a timeout option to the NavigateOptions and implement a timeout mechanism in the navigation process. This can prevent the method from waiting indefinitely if the page reload does not complete.
var @params = new ReloadCommandParameters(context);
+if (options?.Timeout.HasValue)+{+ @params.Timeout = options.Timeout.Value;+}
Apply this suggestion
Suggestion importance[1-10]: 6
Why: Implementing a timeout mechanism is a good enhancement to prevent indefinite waiting during page reloads. However, it is a less critical improvement compared to the others.
6
Possible issue
Replace mutable default value with an immutable one to avoid side effects
Replace the mutable default value for Actions in PerformActionsOptions with a more appropriate immutable default. Using mutable default values can lead to unintended side effects if the same instance is reused.
Why: The suggestion correctly identifies a potential issue with using a mutable default value and provides a more appropriate immutable default, which can prevent unintended side effects.
9
Validate the 'Clip' property to ensure it is within the viewport bounds in 'CaptureScreenshotAsync'
For the CaptureScreenshotAsync method, consider checking if the Clip property of the options is within the bounds of the current viewport. This can prevent runtime errors or undefined behavior when the clipping region is out of the viewport bounds.
var @params = new CaptureScreenshotCommandParameters(context);
+if (options?.Clip != null && !IsValidClip(options.Clip))+{+ throw new ArgumentException("Clip parameters are out of the viewport bounds.", nameof(options));+}
Apply this suggestion
Suggestion importance[1-10]: 7
Why: This suggestion adds a validation step to ensure the Clip property is within the viewport bounds, which can prevent potential runtime errors. It is a useful improvement for preventing undefined behavior.
7
Best practice
Implement IDisposable to manage resource cleanup
Implement IDisposable to properly dispose of Lazy fields if they hold unmanaged resources or need explicit disposal.
-private readonly Lazy<BrowsingContextLogModule> _logModule;-private readonly Lazy<BrowsingContextNetworkModule> _networkModule;-private readonly Lazy<BrowsingContextScriptModule> _scriptModule;-private readonly Lazy<BrowsingContextStorageModule> _storageModule;-private readonly Lazy<BrowsingContextInputModule> _inputModule;+public void Dispose()+{+ if (_logModule.IsValueCreated) _logModule.Value.Dispose();+ if (_networkModule.IsValueCreated) _networkModule.Value.Dispose();+ if (_scriptModule.IsValueCreated) _scriptModule.Value.Dispose();+ if (_storageModule.IsValueCreated) _storageModule.Value.Dispose();+ if (_inputModule.IsValueCreated) _inputModule.Value.Dispose();+}
Apply this suggestion
Suggestion importance[1-10]: 8
Why: Implementing IDisposable is a best practice for managing resource cleanup, especially if the Lazy<T> fields hold unmanaged resources or need explicit disposal.
8
Use IReadOnlyList to ensure immutability of the Actions list
Consider using IReadOnlyList instead of List for the Actions property in KeySourceActions to ensure immutability and to prevent external modifications.
-return TraverseHistoryAsync(-1, options);-return TraverseHistoryAsync(1, options);+const int BACK = -1;+const int FORWARD = 1;+return TraverseHistoryAsync(BACK, options);+return TraverseHistoryAsync(FORWARD, options);
Apply this suggestion
Suggestion importance[1-10]: 6
Why: Replacing magic numbers with named constants improves code readability and maintainability. However, the improvement is minor and does not address any critical issue.
6
Performance
✅ Use ConfigureAwait(false) for better performance in asynchronous operations
Utilize ConfigureAwait(false) on all awaited operations within ConnectAsync to ensure the context is not captured, improving performance in environments that do not require the context.
Why: This suggestion enhances performance in asynchronous operations by ensuring the context is not captured, which is beneficial in environments that do not require the context.
8
Maintainability
Use a factory method to initialize Lazy fields
Consider using a factory method to initialize the Lazy fields to reduce redundancy and improve maintainability. This will help centralize the creation logic and make the code cleaner.
-_logModule = new Lazy<BrowsingContextLogModule>(() => new BrowsingContextLogModule(this, _bidi.Log));-_networkModule = new Lazy<BrowsingContextNetworkModule>(() => new BrowsingContextNetworkModule(this, _bidi.Network));-_scriptModule = new Lazy<BrowsingContextScriptModule>(() => new BrowsingContextScriptModule(this, _bidi.ScriptModule));-_storageModule = new Lazy<BrowsingContextStorageModule>(() => new BrowsingContextStorageModule(this, _bidi.Storage));-_inputModule = new Lazy<BrowsingContextInputModule>(() => new BrowsingContextInputModule(this, _bidi.InputModule));+_logModule = CreateLazyModule<BrowsingContextLogModule>(_bidi.Log);+_networkModule = CreateLazyModule<BrowsingContextNetworkModule>(_bidi.Network);+_scriptModule = CreateLazyModule<BrowsingContextScriptModule>(_bidi.ScriptModule);+_storageModule = CreateLazyModule<BrowsingContextStorageModule>(_bidi.Storage);+_inputModule = CreateLazyModule<BrowsingContextInputModule>(_bidi.InputModule);+private Lazy<T> CreateLazyModule<T>(IModule module) where T : IModule+{+ return new Lazy<T>(() => (T)Activator.CreateInstance(typeof(T), new object[] { this, module }));+}+
Apply this suggestion
Suggestion importance[1-10]: 7
Why: The suggestion improves maintainability by reducing redundancy and centralizing the creation logic. However, it introduces additional complexity with the factory method.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
User description
This is the implementation of BiDi protocol for .NET
Description
OpenQA.Selenium.BiDi
namespaceMotivation and Context
Types of changes
Checklist
PR Type
Enhancement
Description
OpenQA.Selenium.BiDi
namespace.BrowsingContextModule
for managing browsing contexts.Broker
class for BiDi protocol communication.BrowsingContext
class for context management.RemoteValue
class and derived types for representing remote values.NetworkModule
for network-related operations.BiDi
class for protocol management.BrowsingContextNetworkModule
for network operations within a browsing context.Command
class and derived types for representing commands.Intercept
class for network intercepts.ScriptModule
for script-related operations.LocalValue
class and derived types for representing local values.RemoteValueConverter
for JSON serialization ofRemoteValue
types.RealmInfo
class and derived types for representing realm information.PerformActionsCommand
for performing input actions.WebSocketTransport
for WebSocket communication.BrowsingContextScriptModule
for script operations within a browsing context.PrintCommand
for printing a browsing context.GetCookiesCommand
for retrieving cookies.SessionModule
for session management.Locator
class and derived types for locating elements.Request
class for managing network requests.StorageModule
for storage-related operations.CaptureScreenshotCommand
for capturing screenshots.RealmInfoConverter
for JSON serialization ofRealmInfo
types.EventHandler
class and derived types for handling events.EvaluateCommand
for evaluating scripts.BrowserModule
for browser operations.BrowsingContextStorageModule
for storage operations within a browsing context.RealmTypeConverter
for JSON serialization ofRealmType
enum.UrlPattern
class and derived types for representing URL patterns.CallFunctionCommand
for calling functions.ProxyConfiguration
class and derived types for configuring proxies.Subscription
class for event management.LogEntry
class and derived types for representing log entries.ContinueResponseCommand
for continuing responses.ProvideResponseCommand
for providing responses.ContinueRequestCommand
for continuing requests.LogEntryConverter
for JSON serialization ofLogEntry
types.ContinueWithAuthCommand
for continuing with authentication.EvaluateResultConverter
for JSON serialization ofEvaluateResult
types.SetCookieCommand
for setting cookies.MessageConverter
for JSON serialization ofMessage
types.LocateNodesCommand
for locating nodes.AddInterceptCommand
for adding intercepts.AddPreloadScriptCommand
for adding preload scripts.DateTimeOffsetConverter
for JSON serialization ofDateTimeOffset
.InternalIdConverter
for JSON serialization.ChannelConverter
for JSON serialization.HandleConverter
for JSON serialization.RealmConverter
for JSON serialization.RequestConverter
for JSON serialization.GetRealmsCommand
and related records.GetTreeCommand
and related records.Message
records for communication.SetViewportCommand
and related records.LogModule
for log entry subscriptions.NavigateCommand
and related records.NewCommand
and related records.PreloadScript
class for managing preload scripts.NavigationConverter
for JSON serialization.HandleUserPromptCommand
and related records.UserContext
class for managing user contexts.ReloadCommand
and related records.ResponseData
record for network responses.SetCookieHeader
record for cookies.SubscribeCommand
and related records.BrowsingContextInfo
record for context info.Initiator
record and enum for network requests.DeleteCookiesCommand
and related records.BrowsingContextInputModule
for input actions.UserPromptOpenedEventArgs
andUserPromptType
enum.BaseParametersEventArgs
for network events.BytesValue
and derived records.Target
and derived records.CapabilityRequest
class for session capabilities.ScriptEvaluateException
class.FetchTimingInfo
record for network timings.Cookie
record andSameSite
enum.BeforeRequestSentEventArgs
record.ITransport
interface for communication.ResponseCompletedEventArgs
record.SerializationOptions
class andShadowTree
enum.FetchErrorEventArgs
record.ResponseStartedEventArgs
record.TraverseHistoryCommand
and related records.AuthCredentials
and derived records.EventArgs
and derived records.RemovePreloadScriptCommand
and related records.RemoveUserContextCommand
and related records.AuthRequiredEventArgs
record.RemoveInterceptCommand
and related records.DisownCommand
and related records.GetUserContextsCommand
and related records.ChannelValue
andChannelProperties
records.RemoteReference
and derived records.UserPromptClosedEventArgs
record.ReleaseActionsCommand
and related records.FailRequestCommand
and related records.ActivateCommand
and related records.CloseCommand
and related records.InternalId
class.Handle
class.Realm
class.Channel
class.RequestData
record for network requests.CapabilitiesRequest
class.StatusCommand
and related records.RealmType
enum for script realms.Changes walkthrough 📝
46 files
BrowsingContextModule.cs
Introduce BrowsingContextModule for managing browsing contexts
dotnet/src/webdriver/BiDi/Modules/BrowsingContext/BrowsingContextModule.cs
BrowsingContextModule
class with various methods formanaging browsing contexts.
browsing contexts.
events.
Broker.cs
Implement Broker class for BiDi protocol communication
dotnet/src/webdriver/BiDi/Communication/Broker.cs
Broker
class for handling communication with the BiDiprotocol.
messages.
BrowsingContext.cs
Introduce BrowsingContext class for context management
dotnet/src/webdriver/BiDi/Modules/BrowsingContext/BrowsingContext.cs
BrowsingContext
class representing a browsing context.context.
RemoteValue.cs
Define RemoteValue class and derived types
dotnet/src/webdriver/BiDi/Modules/Script/RemoteValue.cs
RemoteValue
class and its derived types for representingremote values.
NumberRemoteValue
,StringRemoteValue
, andObjectRemoteValue
.NetworkModule.cs
Introduce NetworkModule for network operations
dotnet/src/webdriver/BiDi/Modules/Network/NetworkModule.cs
NetworkModule
class for managing network-relatedoperations.
requests.
BiDi.cs
Implement BiDi class for protocol management
dotnet/src/webdriver/BiDi/BiDi.cs
BiDi
class for managing the BiDi protocol connection.getting context trees.
events.
BrowsingContextNetworkModule.cs
Introduce BrowsingContextNetworkModule for network operations
dotnet/src/webdriver/BiDi/Modules/BrowsingContext/BrowsingContextNetworkModule.cs
BrowsingContextNetworkModule
class for managing networkoperations within a browsing context.
events.
Command.cs
Define Command class and derived types
dotnet/src/webdriver/BiDi/Communication/Command.cs
Command
class and its derived types for representingcommands.
Session
,Browser
, andNetwork
.Intercept.cs
Introduce Intercept class for network intercepts
dotnet/src/webdriver/BiDi/Modules/Network/Intercept.cs
Intercept
class for managing network intercepts.events.
ScriptModule.cs
Introduce ScriptModule for script operations
dotnet/src/webdriver/BiDi/Modules/Script/ScriptModule.cs
ScriptModule
class for managing script-related operations.LocalValue.cs
Define LocalValue class and derived types
dotnet/src/webdriver/BiDi/Modules/Script/LocalValue.cs
LocalValue
class and its derived types for representinglocal values.
NumberLocalValue
,StringLocalValue
, andObjectLocalValue
.RemoteValueConverter.cs
Implement RemoteValueConverter for JSON serialization
dotnet/src/webdriver/BiDi/Communication/Json/Converters/Polymorphic/RemoteValueConverter.cs
RemoteValueConverter
class for JSON serialization ofRemoteValue
types.RemoteValue
objects.RealmInfo.cs
Define RealmInfo class and derived types
dotnet/src/webdriver/BiDi/Modules/Script/RealmInfo.cs
RealmInfo
class and its derived types for representingrealm information.
WindowRealmInfo
,WorkerRealmInfo
, andServiceWorkerRealmInfo
.PerformActionsCommand.cs
Define PerformActionsCommand and action types
dotnet/src/webdriver/BiDi/Modules/Input/PerformActionsCommand.cs
PerformActionsCommand
class and its parameters forperforming input actions.
KeyDownAction
,KeyUpAction
, andKeyPauseAction
.WebSocketTransport.cs
Implement WebSocketTransport for WebSocket communication
dotnet/src/webdriver/BiDi/Communication/Transport/WebSocketTransport.cs
WebSocketTransport
class for managing WebSocketconnections.
BrowsingContextScriptModule.cs
Introduce BrowsingContextScriptModule for script operations
dotnet/src/webdriver/BiDi/Modules/BrowsingContext/BrowsingContextScriptModule.cs
BrowsingContextScriptModule
class for managing scriptoperations within a browsing context.
PrintCommand.cs
Define PrintCommand and print options
dotnet/src/webdriver/BiDi/Modules/BrowsingContext/PrintCommand.cs
PrintCommand
class and its parameters for printing abrowsing context.
orientation, and scale.
GetCookiesCommand.cs
Define GetCookiesCommand and options
dotnet/src/webdriver/BiDi/Modules/Storage/GetCookiesCommand.cs
GetCookiesCommand
class and its parameters for retrievingcookies.
SessionModule.cs
Introduce SessionModule for session management
dotnet/src/webdriver/BiDi/Modules/Session/SessionModule.cs
SessionModule
class for managing session-relatedoperations.
to events.
Locator.cs
Define Locator class and derived types
dotnet/src/webdriver/BiDi/Modules/BrowsingContext/Locator.cs
Locator
class and its derived types for locating elements.CssLocator
,XPathLocator
, andInnerTextLocator
.Request.cs
Introduce Request class for network requests
dotnet/src/webdriver/BiDi/Modules/Network/Request.cs
Request
class for managing network requests.to requests.
StorageModule.cs
Introduce StorageModule for storage operations
dotnet/src/webdriver/BiDi/Modules/Storage/StorageModule.cs
StorageModule
class for managing storage-relatedoperations.
CaptureScreenshotCommand.cs
Define CaptureScreenshotCommand and options
dotnet/src/webdriver/BiDi/Modules/BrowsingContext/CaptureScreenshotCommand.cs
CaptureScreenshotCommand
class and its parameters forcapturing screenshots.
format, and clip.
RealmInfoConverter.cs
Implement RealmInfoConverter for JSON serialization
dotnet/src/webdriver/BiDi/Communication/Json/Converters/Polymorphic/RealmInfoConverter.cs
RealmInfoConverter
class for JSON serialization ofRealmInfo
types.RealmInfo
objects.EventHandler.cs
Define EventHandler class and derived types
dotnet/src/webdriver/BiDi/Communication/EventHandler.cs
EventHandler
class and its derived types for handlingevents.
EvaluateCommand.cs
Define EvaluateCommand and result types
dotnet/src/webdriver/BiDi/Modules/Script/EvaluateCommand.cs
EvaluateCommand
class and its parameters for evaluatingscripts.
BrowserModule.cs
Introduce BrowserModule for browser operations
dotnet/src/webdriver/BiDi/Modules/Browser/BrowserModule.cs
BrowserModule
class for managing browser-relatedoperations.
contexts.
BrowsingContextStorageModule.cs
Introduce BrowsingContextStorageModule for storage operations
dotnet/src/webdriver/BiDi/Modules/BrowsingContext/BrowsingContextStorageModule.cs
BrowsingContextStorageModule
class for managing storageoperations within a browsing context.
RealmTypeConverter.cs
Implement RealmTypeConverter for JSON serialization
dotnet/src/webdriver/BiDi/Communication/Json/Converters/RealmTypeConverter.cs
RealmTypeConverter
class for JSON serialization ofRealmType
enum.RealmType
values.UrlPattern.cs
Define UrlPattern class and derived types
dotnet/src/webdriver/BiDi/Modules/Network/UrlPattern.cs
UrlPattern
class and its derived types for representingURL patterns.
UrlPatternPattern
andUrlPatternString
.CallFunctionCommand.cs
Define CallFunctionCommand and options
dotnet/src/webdriver/BiDi/Modules/Script/CallFunctionCommand.cs
CallFunctionCommand
class and its parameters for callingfunctions.
ProxyConfiguration.cs
Define ProxyConfiguration class and derived types
dotnet/src/webdriver/BiDi/Modules/Session/ProxyConfiguration.cs
ProxyConfiguration
class and its derived types forconfiguring proxies.
ManualProxyConfiguration
andPacProxyConfiguration
.Subscription.cs
Introduce Subscription class for event management
dotnet/src/webdriver/BiDi/Subscription.cs
Subscription
class for managing event subscriptions.LogEntry.cs
Define LogEntry class and derived types
dotnet/src/webdriver/BiDi/Modules/Log/LogEntry.cs
LogEntry
class and its derived types for representing logentries.
ConsoleLogEntry
andJavascriptLogEntry
.ContinueResponseCommand.cs
Define ContinueResponseCommand and options
dotnet/src/webdriver/BiDi/Modules/Network/ContinueResponseCommand.cs
ContinueResponseCommand
class and its parameters forcontinuing responses.
ProvideResponseCommand.cs
Define ProvideResponseCommand and options
dotnet/src/webdriver/BiDi/Modules/Network/ProvideResponseCommand.cs
ProvideResponseCommand
class and its parameters forproviding responses.
ContinueRequestCommand.cs
Define ContinueRequestCommand and options
dotnet/src/webdriver/BiDi/Modules/Network/ContinueRequestCommand.cs
ContinueRequestCommand
class and its parameters forcontinuing requests.
LogEntryConverter.cs
Implement LogEntryConverter for JSON serialization
dotnet/src/webdriver/BiDi/Communication/Json/Converters/Polymorphic/LogEntryConverter.cs
LogEntryConverter
class for JSON serialization ofLogEntry
types.
LogEntry
objects.ContinueWithAuthCommand.cs
Define ContinueWithAuthCommand and options
dotnet/src/webdriver/BiDi/Modules/Network/ContinueWithAuthCommand.cs
ContinueWithAuthCommand
class and its parameters forcontinuing with authentication.
settings.
EvaluateResultConverter.cs
Implement EvaluateResultConverter for JSON serialization
dotnet/src/webdriver/BiDi/Communication/Json/Converters/Polymorphic/EvaluateResultConverter.cs
EvaluateResultConverter
class for JSON serialization ofEvaluateResult
types.EvaluateResult
objects.
SetCookieCommand.cs
Define SetCookieCommand and options
dotnet/src/webdriver/BiDi/Modules/Storage/SetCookieCommand.cs
SetCookieCommand
class and its parameters for settingcookies.
MessageConverter.cs
Implement MessageConverter for JSON serialization
dotnet/src/webdriver/BiDi/Communication/Json/Converters/Polymorphic/MessageConverter.cs
MessageConverter
class for JSON serialization ofMessage
types.
Message
objects.LocateNodesCommand.cs
Define LocateNodesCommand and options
dotnet/src/webdriver/BiDi/Modules/BrowsingContext/LocateNodesCommand.cs
LocateNodesCommand
class and its parameters for locatingnodes.
AddInterceptCommand.cs
Define AddInterceptCommand and options
dotnet/src/webdriver/BiDi/Modules/Network/AddInterceptCommand.cs
AddInterceptCommand
class and its parameters for addingintercepts.
AddPreloadScriptCommand.cs
Define AddPreloadScriptCommand and options
dotnet/src/webdriver/BiDi/Modules/Script/AddPreloadScriptCommand.cs
AddPreloadScriptCommand
class and its parameters foradding preload scripts.
WebDriver.Extensions.cs
Add WebDriver extension methods for BiDi protocol
dotnet/src/webdriver/BiDi/WebDriver.Extensions.cs
IWebDriver
to support BiDi protocol.BrowsingContext.
61 files
InternalIdConverter.cs
Add InternalIdConverter for JSON serialization.
dotnet/src/webdriver/BiDi/Communication/Json/Converters/InternalIdConverter.cs
InternalIdConverter
class for JSON serialization.Read
andWrite
methods forInternalId
.ChannelConverter.cs
Add ChannelConverter for JSON serialization.
dotnet/src/webdriver/BiDi/Communication/Json/Converters/ChannelConverter.cs
ChannelConverter
class for JSON serialization.Read
andWrite
methods forChannel
.HandleConverter.cs
Add HandleConverter for JSON serialization.
dotnet/src/webdriver/BiDi/Communication/Json/Converters/HandleConverter.cs
HandleConverter
class for JSON serialization.Read
andWrite
methods forHandle
.RealmConverter.cs
Add RealmConverter for JSON serialization.
dotnet/src/webdriver/BiDi/Communication/Json/Converters/RealmConverter.cs
RealmConverter
class for JSON serialization.Read
andWrite
methods forRealm
.RequestConverter.cs
Add RequestConverter for JSON serialization.
dotnet/src/webdriver/BiDi/Communication/Json/Converters/RequestConverter.cs
RequestConverter
class for JSON serialization.Read
andWrite
methods forRequest
.GetRealmsCommand.cs
Add GetRealmsCommand and related records.
dotnet/src/webdriver/BiDi/Modules/Script/GetRealmsCommand.cs
GetRealmsCommand
class and related records for commandparameters, options, and results.
GetTreeCommand.cs
Add GetTreeCommand and related records.
dotnet/src/webdriver/BiDi/Modules/BrowsingContext/GetTreeCommand.cs
GetTreeCommand
class and related records for command parameters,options, and results.
Message.cs
Add Message records for communication.
dotnet/src/webdriver/BiDi/Communication/Message.cs
Message
record and derived records for success, error,and event messages.
SetViewportCommand.cs
Add SetViewportCommand and related records.
dotnet/src/webdriver/BiDi/Modules/BrowsingContext/SetViewportCommand.cs
SetViewportCommand
class and related records for commandparameters, options, and viewport structure.
LogModule.cs
Add LogModule for log entry subscriptions.
dotnet/src/webdriver/BiDi/Modules/Log/LogModule.cs
LogModule
class with methods for subscribing to log entryevents.
NavigateCommand.cs
Add NavigateCommand and related records.
dotnet/src/webdriver/BiDi/Modules/BrowsingContext/NavigateCommand.cs
NavigateCommand
class and related records for commandparameters, options, and results.
NewCommand.cs
Add NewCommand and related records.
dotnet/src/webdriver/BiDi/Modules/Session/NewCommand.cs
NewCommand
class and related records for command parameters,options, and results.
PreloadScript.cs
Add PreloadScript class for managing preload scripts.
dotnet/src/webdriver/BiDi/Modules/Script/PreloadScript.cs
PreloadScript
class implementingIAsyncDisposable
for managingpreload scripts.
NavigationConverter.cs
Add NavigationConverter for JSON serialization.
dotnet/src/webdriver/BiDi/Communication/Json/Converters/NavigationConverter.cs
NavigationConverter
class for JSON serialization.Read
andWrite
methods forNavigation
.HandleUserPromptCommand.cs
Add HandleUserPromptCommand and related records.
dotnet/src/webdriver/BiDi/Modules/BrowsingContext/HandleUserPromptCommand.cs
HandleUserPromptCommand
class and related records for commandparameters and options.
UserContext.cs
Add UserContext class for managing user contexts.
dotnet/src/webdriver/BiDi/Modules/Browser/UserContext.cs
UserContext
class implementingIAsyncDisposable
for managinguser contexts.
ReloadCommand.cs
Add ReloadCommand and related records.
dotnet/src/webdriver/BiDi/Modules/BrowsingContext/ReloadCommand.cs
ReloadCommand
class and related records for command parametersand options.
ResponseData.cs
Add ResponseData record for network responses.
dotnet/src/webdriver/BiDi/Modules/Network/ResponseData.cs
ResponseData
record for network response details.SetCookieHeader.cs
Add SetCookieHeader record for cookies.
dotnet/src/webdriver/BiDi/Modules/Network/SetCookieHeader.cs
SetCookieHeader
record for setting cookie headers.SubscribeCommand.cs
Add SubscribeCommand and related records.
dotnet/src/webdriver/BiDi/Modules/Session/SubscribeCommand.cs
SubscribeCommand
class and related records for commandparameters and options.
BrowsingContextInfo.cs
Add BrowsingContextInfo record for context info.
dotnet/src/webdriver/BiDi/Modules/BrowsingContext/BrowsingContextInfo.cs
BrowsingContextInfo
record for browsing context information.Initiator.cs
Add Initiator record and enum for network requests.
dotnet/src/webdriver/BiDi/Modules/Network/Initiator.cs
Initiator
record andInitiatorType
enum for network requestinitiators.
DeleteCookiesCommand.cs
Add DeleteCookiesCommand and related records.
dotnet/src/webdriver/BiDi/Modules/Storage/DeleteCookiesCommand.cs
DeleteCookiesCommand
class and related records for commandparameters, options, and results.
BrowsingContextInputModule.cs
Add BrowsingContextInputModule for input actions.
dotnet/src/webdriver/BiDi/Modules/BrowsingContext/BrowsingContextInputModule.cs
BrowsingContextInputModule
class for performing input actions ina browsing context.
UserPromptOpenedEventArgs.cs
Add UserPromptOpenedEventArgs and UserPromptType enum.
dotnet/src/webdriver/BiDi/Modules/BrowsingContext/UserPromptOpenedEventArgs.cs
UserPromptOpenedEventArgs
record for user prompt opened events.UserPromptType
enum for different prompt types.BaseParametersEventArgs.cs
Add BaseParametersEventArgs for network events.
dotnet/src/webdriver/BiDi/Modules/Network/BaseParametersEventArgs.cs
BaseParametersEventArgs
abstract record for network eventarguments.
BytesValue.cs
Add BytesValue and derived records.
dotnet/src/webdriver/BiDi/Modules/Network/BytesValue.cs
BytesValue
abstract record and derived records for string andbase64 values.
Target.cs
Add Target and derived records.
dotnet/src/webdriver/BiDi/Modules/Script/Target.cs
Target
abstract record and derived records for realm and contexttargets.
CapabilityRequest.cs
Add CapabilityRequest class for session capabilities.
dotnet/src/webdriver/BiDi/Modules/Session/CapabilityRequest.cs
CapabilityRequest
class for session capability requests.ScriptEvaluateException.cs
Add ScriptEvaluateException class.
dotnet/src/webdriver/BiDi/Modules/Script/ScriptEvaluateException.cs
ScriptEvaluateException
class for handling script evaluationexceptions.
FetchTimingInfo.cs
Add FetchTimingInfo record for network timings.
dotnet/src/webdriver/BiDi/Modules/Network/FetchTimingInfo.cs
FetchTimingInfo
record for network fetch timing information.Cookie.cs
Add Cookie record and SameSite enum.
dotnet/src/webdriver/BiDi/Modules/Network/Cookie.cs
Cookie
record for network cookies.SameSite
enum for cookie same-site policies.BeforeRequestSentEventArgs.cs
Add BeforeRequestSentEventArgs record.
dotnet/src/webdriver/BiDi/Modules/Network/BeforeRequestSentEventArgs.cs
BeforeRequestSentEventArgs
record for before request sentevents.
ITransport.cs
Add ITransport interface for communication.
dotnet/src/webdriver/BiDi/Communication/Transport/ITransport.cs
ITransport
interface for communication transport.ResponseCompletedEventArgs.cs
Add ResponseCompletedEventArgs record.
dotnet/src/webdriver/BiDi/Modules/Network/ResponseCompletedEventArgs.cs
ResponseCompletedEventArgs
record for response completed events.SerializationOptions.cs
Add SerializationOptions class and ShadowTree enum.
dotnet/src/webdriver/BiDi/Modules/Script/SerializationOptions.cs
SerializationOptions
class andShadowTree
enum for serializationoptions.
FetchErrorEventArgs.cs
Add FetchErrorEventArgs record.
dotnet/src/webdriver/BiDi/Modules/Network/FetchErrorEventArgs.cs
FetchErrorEventArgs
record for fetch error events.ResponseStartedEventArgs.cs
Add ResponseStartedEventArgs record.
dotnet/src/webdriver/BiDi/Modules/Network/ResponseStartedEventArgs.cs
ResponseStartedEventArgs
record for response started events.TraverseHistoryCommand.cs
Add TraverseHistoryCommand and related records.
dotnet/src/webdriver/BiDi/Modules/BrowsingContext/TraverseHistoryCommand.cs
TraverseHistoryCommand
class and related records for commandparameters, options, and results.
AuthCredentials.cs
Add AuthCredentials and derived records.
dotnet/src/webdriver/BiDi/Modules/Network/AuthCredentials.cs
AuthCredentials
abstract record and derived record for basicauthentication.
EventArgs.cs
Add EventArgs and derived records.
dotnet/src/webdriver/BiDi/EventArgs.cs
EventArgs
abstract record and derived record for browsingcontext events.
RemovePreloadScriptCommand.cs
Add RemovePreloadScriptCommand and related records.
dotnet/src/webdriver/BiDi/Modules/Script/RemovePreloadScriptCommand.cs
RemovePreloadScriptCommand
class and related records for commandparameters and options.
RemoveUserContextCommand.cs
Add RemoveUserContextCommand and related records.
dotnet/src/webdriver/BiDi/Modules/Browser/RemoveUserContextCommand.cs
RemoveUserContextCommand
class and related records for commandparameters and options.
AuthRequiredEventArgs.cs
Add AuthRequiredEventArgs record.
dotnet/src/webdriver/BiDi/Modules/Network/AuthRequiredEventArgs.cs
AuthRequiredEventArgs
record for authentication required events.RemoveInterceptCommand.cs
Add RemoveInterceptCommand and related records.
dotnet/src/webdriver/BiDi/Modules/Network/RemoveInterceptCommand.cs
RemoveInterceptCommand
class and related records for commandparameters and options.
DisownCommand.cs
Add DisownCommand and related records.
dotnet/src/webdriver/BiDi/Modules/Script/DisownCommand.cs
DisownCommand
class and related records for command parameters.GetUserContextsCommand.cs
Add GetUserContextsCommand and related records.
dotnet/src/webdriver/BiDi/Modules/Browser/GetUserContextsCommand.cs
GetUserContextsCommand
class and related records for commandoptions and results.
ChannelValue.cs
Add ChannelValue and ChannelProperties records.
dotnet/src/webdriver/BiDi/Modules/Script/ChannelValue.cs
ChannelValue
record andChannelProperties
record for channelvalues.
RemoteReference.cs
Add RemoteReference and derived records.
dotnet/src/webdriver/BiDi/Modules/Script/RemoteReference.cs
RemoteReference
abstract record and derived records for sharedand remote object references.
UserPromptClosedEventArgs.cs
Add UserPromptClosedEventArgs record.
dotnet/src/webdriver/BiDi/Modules/BrowsingContext/UserPromptClosedEventArgs.cs
UserPromptClosedEventArgs
record for user prompt closed events.ReleaseActionsCommand.cs
Add ReleaseActionsCommand and related records.
dotnet/src/webdriver/BiDi/Modules/Input/ReleaseActionsCommand.cs
ReleaseActionsCommand
class and related records for commandparameters and options.
FailRequestCommand.cs
Add FailRequestCommand and related records.
dotnet/src/webdriver/BiDi/Modules/Network/FailRequestCommand.cs
FailRequestCommand
class and related records for commandparameters and options.
ActivateCommand.cs
Add ActivateCommand and related records.
dotnet/src/webdriver/BiDi/Modules/BrowsingContext/ActivateCommand.cs
ActivateCommand
class and related records for command parametersand options.
CloseCommand.cs
Add CloseCommand and related records.
dotnet/src/webdriver/BiDi/Modules/BrowsingContext/CloseCommand.cs
CloseCommand
class and related records for command parametersand options.
InternalId.cs
Add InternalId class.
dotnet/src/webdriver/BiDi/Modules/Script/InternalId.cs
InternalId
class for internal identifiers.Handle.cs
Add Handle class.
dotnet/src/webdriver/BiDi/Modules/Script/Handle.cs
Handle
class for script handles.Realm.cs
Add Realm class.
dotnet/src/webdriver/BiDi/Modules/Script/Realm.cs
Realm
class for script realms.Channel.cs
Add Channel class.
dotnet/src/webdriver/BiDi/Modules/Script/Channel.cs
Channel
class for script channels.RequestData.cs
Add RequestData record for network requests.
dotnet/src/webdriver/BiDi/Modules/Network/RequestData.cs
RequestData
record for network request details.CapabilitiesRequest.cs
Add CapabilitiesRequest class.
dotnet/src/webdriver/BiDi/Modules/Session/CapabilitiesRequest.cs
CapabilitiesRequest
class for session capabilities requests.StatusCommand.cs
Add StatusCommand and related records.
dotnet/src/webdriver/BiDi/Modules/Session/StatusCommand.cs
StatusCommand
class and related records for command options andresults.