Skip to content

Commit a822240

Browse files
Merge branch 'trunk' into add-js-filter-auth
2 parents e7513c9 + 438b77c commit a822240

File tree

61 files changed

+396
-485
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+396
-485
lines changed

MODULE.bazel

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ bazel_dep(name = "protobuf", version = "21.7", dev_dependency = True, repo_name
1717
# Required for rules_rust to import the crates properly
1818
bazel_dep(name = "rules_cc", version = "0.0.9", dev_dependency = True)
1919

20-
bazel_dep(name = "rules_dotnet", version = "0.15.1")
20+
bazel_dep(name = "rules_dotnet", version = "0.16.0")
2121
bazel_dep(name = "rules_java", version = "7.11.1")
2222
bazel_dep(name = "rules_jvm_external", version = "6.3")
2323
bazel_dep(name = "rules_nodejs", version = "6.2.0")
@@ -178,8 +178,7 @@ maven.install(
178178
"com.google.auto.service:auto-service:1.1.1",
179179
"com.google.auto.service:auto-service-annotations:1.1.1",
180180
"com.google.googlejavaformat:google-java-format:jar:1.23.0",
181-
"com.graphql-java:graphql-java:20.2",
182-
"com.graphql-java:java-dataloader:3.2.0",
181+
"com.graphql-java:graphql-java:22.3",
183182
"dev.failsafe:failsafe:3.3.2",
184183
"io.grpc:grpc-context:1.66.0",
185184
"io.lettuce:lettuce-core:6.4.0.RELEASE",

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Selenium
22

33
[![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)
4+
[![Releases downloads](https://img.shields.io/github/downloads/SeleniumHQ/selenium/total.svg)](https://github.com/SeleniumHQ/selenium/releases)
45

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

dotnet/src/support/UI/LoadableComponentException.cs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -57,17 +57,5 @@ public LoadableComponentException(string message, Exception innerException)
5757
: base(message, innerException)
5858
{
5959
}
60-
61-
/// <summary>
62-
/// Initializes a new instance of the <see cref="LoadableComponentException"/> class with serialized data.
63-
/// </summary>
64-
/// <param name="info">The <see cref="SerializationInfo"/> that holds the serialized
65-
/// object data about the exception being thrown.</param>
66-
/// <param name="context">The <see cref="StreamingContext"/> that contains contextual
67-
/// information about the source or destination.</param>
68-
protected LoadableComponentException(SerializationInfo info, StreamingContext context)
69-
: base(info, context)
70-
{
71-
}
7260
}
7361
}

dotnet/src/support/UI/UnexpectedTagNameException.cs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -69,17 +69,5 @@ public UnexpectedTagNameException(string message, Exception innerException)
6969
: base(message, innerException)
7070
{
7171
}
72-
73-
/// <summary>
74-
/// Initializes a new instance of the <see cref="UnexpectedTagNameException"/> class with serialized data.
75-
/// </summary>
76-
/// <param name="info">The <see cref="SerializationInfo"/> that holds the serialized
77-
/// object data about the exception being thrown.</param>
78-
/// <param name="context">The <see cref="StreamingContext"/> that contains contextual
79-
/// information about the source or destination.</param>
80-
protected UnexpectedTagNameException(SerializationInfo info, StreamingContext context)
81-
: base(info, context)
82-
{
83-
}
8472
}
8573
}

dotnet/src/webdriver/BUILD.bazel

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ csharp_library(
5555
framework("nuget", "Microsoft.Bcl.AsyncInterfaces"),
5656
framework("nuget", "System.Threading.Tasks.Extensions"),
5757
framework("nuget", "System.Memory"),
58+
framework("nuget", "System.Text.Encodings.Web"),
5859
framework("nuget", "System.Text.Json"),
5960
],
6061
)
@@ -119,6 +120,7 @@ csharp_library(
119120
framework("nuget", "Microsoft.Bcl.AsyncInterfaces"),
120121
framework("nuget", "System.Threading.Tasks.Extensions"),
121122
framework("nuget", "System.Memory"),
123+
framework("nuget", "System.Text.Encodings.Web"),
122124
framework("nuget", "System.Text.Json"),
123125
],
124126
)

dotnet/src/webdriver/DetachedShadowRootException.cs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -57,17 +57,5 @@ public DetachedShadowRootException(string message, Exception innerException)
5757
: base(message, innerException)
5858
{
5959
}
60-
61-
/// <summary>
62-
/// Initializes a new instance of the <see cref="DetachedShadowRootException"/> class with serialized data.
63-
/// </summary>
64-
/// <param name="info">The <see cref="SerializationInfo"/> that holds the serialized
65-
/// object data about the exception being thrown.</param>
66-
/// <param name="context">The <see cref="StreamingContext"/> that contains contextual
67-
/// information about the source or destination.</param>
68-
protected DetachedShadowRootException(SerializationInfo info, StreamingContext context)
69-
: base(info, context)
70-
{
71-
}
7260
}
7361
}

dotnet/src/webdriver/DevTools/DevToolsSession.cs

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
// limitations under the License.
1717
// </copyright>
1818

19+
using OpenQA.Selenium.Internal.Logging;
1920
using System;
2021
using System.Collections.Concurrent;
2122
using System.Globalization;
@@ -56,6 +57,8 @@ public class DevToolsSession : IDevToolsSession
5657
private DevToolsDomains domains;
5758
private readonly DevToolsOptions options;
5859

60+
private readonly static ILogger logger = Internal.Logging.Log.GetLogger<DevToolsSession>();
61+
5962
/// <summary>
6063
/// Initializes a new instance of the DevToolsSession class, using the specified WebSocket endpoint.
6164
/// </summary>
@@ -272,6 +275,11 @@ public T GetVersionSpecificDomains<T>() where T : DevToolsSessionDomains
272275

273276
if (this.connection != null && this.connection.IsActive)
274277
{
278+
if (logger.IsEnabled(LogEventLevel.Trace))
279+
{
280+
logger.Trace($"CDP SND >> {message.CommandId} {message.CommandName}: {commandParameters.ToJsonString()}");
281+
}
282+
275283
LogTrace("Sending {0} {1}: {2}", message.CommandId, message.CommandName, commandParameters.ToString());
276284

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

541549
private void ProcessMessage(string message)
542550
{
551+
if (logger.IsEnabled(LogEventLevel.Trace))
552+
{
553+
logger.Trace($"CDP RCV << {message}");
554+
}
555+
543556
var messageObject = JsonObject.Parse(message).AsObject();
544557

545558
if (messageObject.TryGetPropertyValue("id", out var idProperty))
@@ -583,7 +596,22 @@ private void ProcessMessage(string message)
583596
// DevTools commands that may be sent in the body of the attached
584597
// event handler. If thread pool starvation seems to become a problem,
585598
// we can switch to a channel-based queue.
586-
Task.Run(() => OnDevToolsEventReceived(new DevToolsEventReceivedEventArgs(methodParts[0], methodParts[1], eventData)));
599+
Task.Run(() =>
600+
{
601+
try
602+
{
603+
OnDevToolsEventReceived(new DevToolsEventReceivedEventArgs(methodParts[0], methodParts[1], eventData));
604+
}
605+
catch (Exception ex)
606+
{
607+
if (logger.IsEnabled(LogEventLevel.Warn))
608+
{
609+
logger.Warn($"CDP VNT ^^ Unhandled error occured in event handler of '{method}' method. {ex}");
610+
}
611+
612+
throw;
613+
}
614+
});
587615

588616
return;
589617
}

dotnet/src/webdriver/DriverServiceNotFoundException.cs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -57,17 +57,5 @@ public DriverServiceNotFoundException(string message, Exception innerException)
5757
: base(message, innerException)
5858
{
5959
}
60-
61-
/// <summary>
62-
/// Initializes a new instance of the <see cref="DriverServiceNotFoundException"/> class with serialized data.
63-
/// </summary>
64-
/// <param name="info">The <see cref="SerializationInfo"/> that holds the serialized
65-
/// object data about the exception being thrown.</param>
66-
/// <param name="context">The <see cref="StreamingContext"/> that contains contextual
67-
/// information about the source or destination.</param>
68-
protected DriverServiceNotFoundException(SerializationInfo info, StreamingContext context)
69-
: base(info, context)
70-
{
71-
}
7260
}
7361
}

dotnet/src/webdriver/ElementClickInterceptedException.cs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -57,17 +57,5 @@ public ElementClickInterceptedException(string message, Exception innerException
5757
: base(message, innerException)
5858
{
5959
}
60-
61-
/// <summary>
62-
/// Initializes a new instance of the <see cref="ElementNotInteractableException"/> class with serialized data.
63-
/// </summary>
64-
/// <param name="info">The <see cref="SerializationInfo"/> that holds the serialized
65-
/// object data about the exception being thrown.</param>
66-
/// <param name="context">The <see cref="StreamingContext"/> that contains contextual
67-
/// information about the source or destination.</param>
68-
protected ElementClickInterceptedException(SerializationInfo info, StreamingContext context)
69-
: base(info, context)
70-
{
71-
}
7260
}
7361
}

dotnet/src/webdriver/ElementNotInteractableException.cs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -57,17 +57,5 @@ public ElementNotInteractableException(string message, Exception innerException)
5757
: base(message, innerException)
5858
{
5959
}
60-
61-
/// <summary>
62-
/// Initializes a new instance of the <see cref="ElementNotInteractableException"/> class with serialized data.
63-
/// </summary>
64-
/// <param name="info">The <see cref="SerializationInfo"/> that holds the serialized
65-
/// object data about the exception being thrown.</param>
66-
/// <param name="context">The <see cref="StreamingContext"/> that contains contextual
67-
/// information about the source or destination.</param>
68-
protected ElementNotInteractableException(SerializationInfo info, StreamingContext context)
69-
: base(info, context)
70-
{
71-
}
7260
}
7361
}

0 commit comments

Comments
 (0)