Skip to content

Commit

Permalink
Merge branch 'trunk' into add-js-filter-auth
Browse files Browse the repository at this point in the history
  • Loading branch information
AutomatedTester authored Oct 11, 2024
2 parents e7513c9 + 438b77c commit a822240
Show file tree
Hide file tree
Showing 61 changed files with 396 additions and 485 deletions.
5 changes: 2 additions & 3 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ bazel_dep(name = "protobuf", version = "21.7", dev_dependency = True, repo_name
# Required for rules_rust to import the crates properly
bazel_dep(name = "rules_cc", version = "0.0.9", dev_dependency = True)

bazel_dep(name = "rules_dotnet", version = "0.15.1")
bazel_dep(name = "rules_dotnet", version = "0.16.0")
bazel_dep(name = "rules_java", version = "7.11.1")
bazel_dep(name = "rules_jvm_external", version = "6.3")
bazel_dep(name = "rules_nodejs", version = "6.2.0")
Expand Down Expand Up @@ -178,8 +178,7 @@ maven.install(
"com.google.auto.service:auto-service:1.1.1",
"com.google.auto.service:auto-service-annotations:1.1.1",
"com.google.googlejavaformat:google-java-format:jar:1.23.0",
"com.graphql-java:graphql-java:20.2",
"com.graphql-java:java-dataloader:3.2.0",
"com.graphql-java:graphql-java:22.3",
"dev.failsafe:failsafe:3.3.2",
"io.grpc:grpc-context:1.66.0",
"io.lettuce:lettuce-core:6.4.0.RELEASE",
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Selenium

[![CI](https://github.com/SeleniumHQ/selenium/actions/workflows/ci.yml/badge.svg?branch=trunk&event=schedule)](https://github.com/SeleniumHQ/selenium/actions/workflows/ci.yml)
[![Releases downloads](https://img.shields.io/github/downloads/SeleniumHQ/selenium/total.svg)](https://github.com/SeleniumHQ/selenium/releases)

<a href="https://selenium.dev"><img src="common/images/selenium_logo_mark_green.svg" width="180" alt="Selenium Logo"/></a>

Expand Down
12 changes: 0 additions & 12 deletions dotnet/src/support/UI/LoadableComponentException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,5 @@ public LoadableComponentException(string message, Exception innerException)
: base(message, innerException)
{
}

/// <summary>
/// Initializes a new instance of the <see cref="LoadableComponentException"/> class with serialized data.
/// </summary>
/// <param name="info">The <see cref="SerializationInfo"/> that holds the serialized
/// object data about the exception being thrown.</param>
/// <param name="context">The <see cref="StreamingContext"/> that contains contextual
/// information about the source or destination.</param>
protected LoadableComponentException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
}
}
}
12 changes: 0 additions & 12 deletions dotnet/src/support/UI/UnexpectedTagNameException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,17 +69,5 @@ public UnexpectedTagNameException(string message, Exception innerException)
: base(message, innerException)
{
}

/// <summary>
/// Initializes a new instance of the <see cref="UnexpectedTagNameException"/> class with serialized data.
/// </summary>
/// <param name="info">The <see cref="SerializationInfo"/> that holds the serialized
/// object data about the exception being thrown.</param>
/// <param name="context">The <see cref="StreamingContext"/> that contains contextual
/// information about the source or destination.</param>
protected UnexpectedTagNameException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
}
}
}
2 changes: 2 additions & 0 deletions dotnet/src/webdriver/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ csharp_library(
framework("nuget", "Microsoft.Bcl.AsyncInterfaces"),
framework("nuget", "System.Threading.Tasks.Extensions"),
framework("nuget", "System.Memory"),
framework("nuget", "System.Text.Encodings.Web"),
framework("nuget", "System.Text.Json"),
],
)
Expand Down Expand Up @@ -119,6 +120,7 @@ csharp_library(
framework("nuget", "Microsoft.Bcl.AsyncInterfaces"),
framework("nuget", "System.Threading.Tasks.Extensions"),
framework("nuget", "System.Memory"),
framework("nuget", "System.Text.Encodings.Web"),
framework("nuget", "System.Text.Json"),
],
)
Expand Down
12 changes: 0 additions & 12 deletions dotnet/src/webdriver/DetachedShadowRootException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,5 @@ public DetachedShadowRootException(string message, Exception innerException)
: base(message, innerException)
{
}

/// <summary>
/// Initializes a new instance of the <see cref="DetachedShadowRootException"/> class with serialized data.
/// </summary>
/// <param name="info">The <see cref="SerializationInfo"/> that holds the serialized
/// object data about the exception being thrown.</param>
/// <param name="context">The <see cref="StreamingContext"/> that contains contextual
/// information about the source or destination.</param>
protected DetachedShadowRootException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
}
}
}
30 changes: 29 additions & 1 deletion dotnet/src/webdriver/DevTools/DevToolsSession.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
// limitations under the License.
// </copyright>

using OpenQA.Selenium.Internal.Logging;
using System;
using System.Collections.Concurrent;
using System.Globalization;
Expand Down Expand Up @@ -56,6 +57,8 @@ public class DevToolsSession : IDevToolsSession
private DevToolsDomains domains;
private readonly DevToolsOptions options;

private readonly static ILogger logger = Internal.Logging.Log.GetLogger<DevToolsSession>();

/// <summary>
/// Initializes a new instance of the DevToolsSession class, using the specified WebSocket endpoint.
/// </summary>
Expand Down Expand Up @@ -272,6 +275,11 @@ public T GetVersionSpecificDomains<T>() where T : DevToolsSessionDomains

if (this.connection != null && this.connection.IsActive)
{
if (logger.IsEnabled(LogEventLevel.Trace))
{
logger.Trace($"CDP SND >> {message.CommandId} {message.CommandName}: {commandParameters.ToJsonString()}");
}

LogTrace("Sending {0} {1}: {2}", message.CommandId, message.CommandName, commandParameters.ToString());

string contents = JsonSerializer.Serialize(message);
Expand Down Expand Up @@ -540,6 +548,11 @@ private void MonitorMessageQueue()

private void ProcessMessage(string message)
{
if (logger.IsEnabled(LogEventLevel.Trace))
{
logger.Trace($"CDP RCV << {message}");
}

var messageObject = JsonObject.Parse(message).AsObject();

if (messageObject.TryGetPropertyValue("id", out var idProperty))
Expand Down Expand Up @@ -583,7 +596,22 @@ private void ProcessMessage(string message)
// DevTools commands that may be sent in the body of the attached
// event handler. If thread pool starvation seems to become a problem,
// we can switch to a channel-based queue.
Task.Run(() => OnDevToolsEventReceived(new DevToolsEventReceivedEventArgs(methodParts[0], methodParts[1], eventData)));
Task.Run(() =>
{
try
{
OnDevToolsEventReceived(new DevToolsEventReceivedEventArgs(methodParts[0], methodParts[1], eventData));
}
catch (Exception ex)
{
if (logger.IsEnabled(LogEventLevel.Warn))
{
logger.Warn($"CDP VNT ^^ Unhandled error occured in event handler of '{method}' method. {ex}");
}

throw;
}
});

return;
}
Expand Down
12 changes: 0 additions & 12 deletions dotnet/src/webdriver/DriverServiceNotFoundException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,5 @@ public DriverServiceNotFoundException(string message, Exception innerException)
: base(message, innerException)
{
}

/// <summary>
/// Initializes a new instance of the <see cref="DriverServiceNotFoundException"/> class with serialized data.
/// </summary>
/// <param name="info">The <see cref="SerializationInfo"/> that holds the serialized
/// object data about the exception being thrown.</param>
/// <param name="context">The <see cref="StreamingContext"/> that contains contextual
/// information about the source or destination.</param>
protected DriverServiceNotFoundException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
}
}
}
12 changes: 0 additions & 12 deletions dotnet/src/webdriver/ElementClickInterceptedException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,5 @@ public ElementClickInterceptedException(string message, Exception innerException
: base(message, innerException)
{
}

/// <summary>
/// Initializes a new instance of the <see cref="ElementNotInteractableException"/> class with serialized data.
/// </summary>
/// <param name="info">The <see cref="SerializationInfo"/> that holds the serialized
/// object data about the exception being thrown.</param>
/// <param name="context">The <see cref="StreamingContext"/> that contains contextual
/// information about the source or destination.</param>
protected ElementClickInterceptedException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
}
}
}
12 changes: 0 additions & 12 deletions dotnet/src/webdriver/ElementNotInteractableException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,5 @@ public ElementNotInteractableException(string message, Exception innerException)
: base(message, innerException)
{
}

/// <summary>
/// Initializes a new instance of the <see cref="ElementNotInteractableException"/> class with serialized data.
/// </summary>
/// <param name="info">The <see cref="SerializationInfo"/> that holds the serialized
/// object data about the exception being thrown.</param>
/// <param name="context">The <see cref="StreamingContext"/> that contains contextual
/// information about the source or destination.</param>
protected ElementNotInteractableException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
}
}
}
12 changes: 0 additions & 12 deletions dotnet/src/webdriver/ElementNotSelectableException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,5 @@ public ElementNotSelectableException(string message, Exception innerException)
: base(message, innerException)
{
}

/// <summary>
/// Initializes a new instance of the <see cref="ElementNotInteractableException"/> class with serialized data.
/// </summary>
/// <param name="info">The <see cref="SerializationInfo"/> that holds the serialized
/// object data about the exception being thrown.</param>
/// <param name="context">The <see cref="StreamingContext"/> that contains contextual
/// information about the source or destination.</param>
protected ElementNotSelectableException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
}
}
}
12 changes: 0 additions & 12 deletions dotnet/src/webdriver/ElementNotVisibleException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,5 @@ public ElementNotVisibleException(string message, Exception innerException)
: base(message, innerException)
{
}

/// <summary>
/// Initializes a new instance of the <see cref="ElementNotVisibleException"/> class with serialized data.
/// </summary>
/// <param name="info">The <see cref="SerializationInfo"/> that holds the serialized
/// object data about the exception being thrown.</param>
/// <param name="context">The <see cref="StreamingContext"/> that contains contextual
/// information about the source or destination.</param>
protected ElementNotVisibleException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
}
}
}
12 changes: 0 additions & 12 deletions dotnet/src/webdriver/InsecureCertificateException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,5 @@ public InsecureCertificateException(string message, Exception innerException)
: base(message, innerException)
{
}

/// <summary>
/// Initializes a new instance of the <see cref="InsecureCertificateException"/> class with serialized data.
/// </summary>
/// <param name="info">The <see cref="SerializationInfo"/> that holds the serialized
/// object data about the exception being thrown.</param>
/// <param name="context">The <see cref="StreamingContext"/> that contains contextual
/// information about the source or destination.</param>
protected InsecureCertificateException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
}
}
}
12 changes: 0 additions & 12 deletions dotnet/src/webdriver/InvalidCookieDomainException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,5 @@ public InvalidCookieDomainException(string message, Exception innerException)
: base(message, innerException)
{
}

/// <summary>
/// Initializes a new instance of the <see cref="InvalidCookieDomainException"/> class with serialized data.
/// </summary>
/// <param name="info">The <see cref="SerializationInfo"/> that holds the serialized
/// object data about the exception being thrown.</param>
/// <param name="context">The <see cref="StreamingContext"/> that contains contextual
/// information about the source or destination.</param>
protected InvalidCookieDomainException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
}
}
}
12 changes: 0 additions & 12 deletions dotnet/src/webdriver/InvalidElementStateException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,5 @@ public InvalidElementStateException(string message, Exception innerException)
: base(message, innerException)
{
}

/// <summary>
/// Initializes a new instance of the <see cref="InvalidElementStateException"/> class with serialized data.
/// </summary>
/// <param name="info">The <see cref="SerializationInfo"/> that holds the serialized
/// object data about the exception being thrown.</param>
/// <param name="context">The <see cref="StreamingContext"/> that contains contextual
/// information about the source or destination.</param>
protected InvalidElementStateException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
}
}
}
12 changes: 0 additions & 12 deletions dotnet/src/webdriver/InvalidSelectorException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,18 +63,6 @@ public InvalidSelectorException(string message, Exception innerException)
{
}

/// <summary>
/// Initializes a new instance of the <see cref="InvalidSelectorException"/> class with serialized data.
/// </summary>
/// <param name="info">The <see cref="SerializationInfo"/> that holds the serialized
/// object data about the exception being thrown.</param>
/// <param name="context">The <see cref="StreamingContext"/> that contains contextual
/// information about the source or destination.</param>
protected InvalidSelectorException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
}

/// <summary>
/// Add information about obtaining additional support from documentation to this exception.
/// </summary>
Expand Down
12 changes: 0 additions & 12 deletions dotnet/src/webdriver/JavaScriptException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,5 @@ public JavaScriptException(string message, Exception innerException)
: base(message, innerException)
{
}

/// <summary>
/// Initializes a new instance of the <see cref="JavaScriptException"/> class with serialized data.
/// </summary>
/// <param name="info">The <see cref="SerializationInfo"/> that holds the serialized
/// object data about the exception being thrown.</param>
/// <param name="context">The <see cref="StreamingContext"/> that contains contextual
/// information about the source or destination.</param>
protected JavaScriptException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
}
}
}
12 changes: 0 additions & 12 deletions dotnet/src/webdriver/MoveTargetOutOfBoundsException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,17 +58,5 @@ public MoveTargetOutOfBoundsException(string message, Exception innerException)
: base(message, innerException)
{
}

/// <summary>
/// Initializes a new instance of the <see cref="MoveTargetOutOfBoundsException"/> class with serialized data.
/// </summary>
/// <param name="info">The <see cref="SerializationInfo"/> that holds the serialized
/// object data about the exception being thrown.</param>
/// <param name="context">The <see cref="StreamingContext"/> that contains contextual
/// information about the source or destination.</param>
protected MoveTargetOutOfBoundsException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
}
}
}
12 changes: 0 additions & 12 deletions dotnet/src/webdriver/NoAlertPresentException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,5 @@ public NoAlertPresentException(string message, Exception innerException)
: base(message, innerException)
{
}

/// <summary>
/// Initializes a new instance of the <see cref="NoAlertPresentException"/> class with serialized data.
/// </summary>
/// <param name="info">The <see cref="SerializationInfo"/> that holds the serialized
/// object data about the exception being thrown.</param>
/// <param name="context">The <see cref="StreamingContext"/> that contains contextual
/// information about the source or destination.</param>
protected NoAlertPresentException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
}
}
}
12 changes: 0 additions & 12 deletions dotnet/src/webdriver/NoSuchDriverException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,18 +64,6 @@ public NoSuchDriverException(string message, Exception innerException)
{
}

/// <summary>
/// Initializes a new instance of the <see cref="NoSuchDriverException"/> class with serialized data.
/// </summary>
/// <param name="info">The <see cref="SerializationInfo"/> that holds the serialized
/// object data about the exception being thrown.</param>
/// <param name="context">The <see cref="StreamingContext"/> that contains contextual
/// information about the source or destination.</param>
protected NoSuchDriverException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
}

/// <summary>
/// Add information about obtaining additional support from documentation to this exception.
/// </summary>
Expand Down
Loading

0 comments on commit a822240

Please sign in to comment.