Skip to content

Commit db511e2

Browse files
authored
Merge branch 'trunk' into syber911911-feature-branch
2 parents 13b170a + f4e414b commit db511e2

File tree

81 files changed

+1205
-11123
lines changed

Some content is hidden

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

81 files changed

+1205
-11123
lines changed

MODULE.bazel

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ 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")
23-
bazel_dep(name = "rules_nodejs", version = "6.2.0")
23+
bazel_dep(name = "rules_nodejs", version = "6.3.0")
2424
bazel_dep(name = "rules_oci", version = "1.7.6")
2525
bazel_dep(name = "rules_pkg", version = "0.10.1")
2626
bazel_dep(name = "rules_python", version = "0.33.0")
@@ -76,7 +76,7 @@ rules_ts_ext.deps(
7676
use_repo(rules_ts_ext, "npm_typescript")
7777

7878
esbuild = use_extension("@aspect_rules_esbuild//esbuild:extensions.bzl", "esbuild")
79-
esbuild.toolchain(esbuild_version = "0.19.9")
79+
esbuild.toolchain(esbuild_version = "0.23.0")
8080
use_repo(esbuild, "esbuild_toolchains")
8181

8282
register_toolchains("@esbuild_toolchains//:all")
@@ -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

Rakefile

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,6 @@ namespace :node do
483483
new_version = updated_version(old_version, arguments[:version], nightly)
484484

485485
['javascript/node/selenium-webdriver/package.json',
486-
'package-lock.json',
487486
'javascript/node/selenium-webdriver/BUILD.bazel'].each do |file|
488487
text = File.read(file).gsub(old_version, new_version)
489488
File.open(file, 'w') { |f| f.puts text }
@@ -1050,8 +1049,7 @@ namespace :all do
10501049
'py/BUILD.bazel',
10511050
'py/setup.py',
10521051
'rb/lib/selenium/webdriver/version.rb',
1053-
'rb/Gemfile.lock',
1054-
'package-lock.json'])
1052+
'rb/Gemfile.lock'])
10551053

10561054
print 'Do you want to push the committed changes? (Y/n): '
10571055
response = $stdin.gets.chomp.downcase
@@ -1106,7 +1104,6 @@ namespace :all do
11061104
'java/version.bzl',
11071105
'javascript/node/selenium-webdriver/CHANGES.md',
11081106
'javascript/node/selenium-webdriver/package.json',
1109-
'package-lock.json',
11101107
'py/docs/source/conf.py',
11111108
'py/selenium/__init__.py',
11121109
'py/selenium/webdriver/__init__.py',

common/repositories.bzl

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ def pin_browsers():
1111

1212
http_archive(
1313
name = "linux_firefox",
14-
url = "https://ftp.mozilla.org/pub/firefox/releases/130.0.1/linux-x86_64/en-US/firefox-130.0.1.tar.bz2",
15-
sha256 = "3b9cd7fe7d22f0960ee5a058e3c9e6b507814958ec5a9ac691cbd5ebd0895c93",
14+
url = "https://ftp.mozilla.org/pub/firefox/releases/131.0/linux-x86_64/en-US/firefox-131.0.tar.bz2",
15+
sha256 = "4ca8504a62a31472ecb8c3a769d4301dd4ac692d4cc5d51b8fe2cf41e7b11106",
1616
build_file_content = """
1717
load("@aspect_rules_js//js:defs.bzl", "js_library")
1818
package(default_visibility = ["//visibility:public"])
@@ -33,8 +33,8 @@ js_library(
3333

3434
dmg_archive(
3535
name = "mac_firefox",
36-
url = "https://ftp.mozilla.org/pub/firefox/releases/130.0.1/mac/en-US/Firefox%20130.0.1.dmg",
37-
sha256 = "63ed878485d5498c269d95ba7e64f1104ed085b8e330b0ef0a565f85cc603426",
36+
url = "https://ftp.mozilla.org/pub/firefox/releases/131.0/mac/en-US/Firefox%20131.0.dmg",
37+
sha256 = "cd243b44746f56ee2042572cccab2736c0c6d419f85f90ad163a4ba04979ccb2",
3838
build_file_content = """
3939
load("@aspect_rules_js//js:defs.bzl", "js_library")
4040
package(default_visibility = ["//visibility:public"])
@@ -50,8 +50,8 @@ js_library(
5050

5151
http_archive(
5252
name = "linux_beta_firefox",
53-
url = "https://ftp.mozilla.org/pub/firefox/releases/131.0b8/linux-x86_64/en-US/firefox-131.0b8.tar.bz2",
54-
sha256 = "53a6c775688243908d5d010c9c14eda488d20faabb966be31fd49d711b89f1e1",
53+
url = "https://ftp.mozilla.org/pub/firefox/releases/132.0b2/linux-x86_64/en-US/firefox-132.0b2.tar.bz2",
54+
sha256 = "f4fb251b50661f27a5f4d87a3dc2839ed329793e232aca47b146d84384208167",
5555
build_file_content = """
5656
load("@aspect_rules_js//js:defs.bzl", "js_library")
5757
package(default_visibility = ["//visibility:public"])
@@ -72,8 +72,8 @@ js_library(
7272

7373
dmg_archive(
7474
name = "mac_beta_firefox",
75-
url = "https://ftp.mozilla.org/pub/firefox/releases/131.0b8/mac/en-US/Firefox%20131.0b8.dmg",
76-
sha256 = "8acb3265bdf9859abfbb58604f5b253a0efe1fab7b82d4ae7d3983706ac5427b",
75+
url = "https://ftp.mozilla.org/pub/firefox/releases/132.0b2/mac/en-US/Firefox%20132.0b2.dmg",
76+
sha256 = "b7be772dc40c7065580e8556f7f037ae1f2960be0276c6f04ed453d4543712a1",
7777
build_file_content = """
7878
load("@aspect_rules_js//js:defs.bzl", "js_library")
7979
package(default_visibility = ["//visibility:public"])
@@ -123,10 +123,10 @@ js_library(
123123

124124
pkg_archive(
125125
name = "mac_edge",
126-
url = "https://msedge.sf.dl.delivery.mp.microsoft.com/filestreamingservice/files/28b1932d-413c-4868-b79f-f72482800efb/MicrosoftEdge-128.0.2739.79.pkg",
127-
sha256 = "8bcdd29a37414136e46860acb6c151d3ae1f9ef1ee62464a0d00a7eda71b5e29",
126+
url = "https://msedge.sf.dl.delivery.mp.microsoft.com/filestreamingservice/files/1077769e-236a-4f55-801d-2f782881fe18/MicrosoftEdge-129.0.2792.65.pkg",
127+
sha256 = "a89a37ddfd655c47a44401a157c6a903f04a87622b64faa86d3897f5506f7481",
128128
move = {
129-
"MicrosoftEdge-128.0.2739.79.pkg/Payload/Microsoft Edge.app": "Edge.app",
129+
"MicrosoftEdge-129.0.2792.65.pkg/Payload/Microsoft Edge.app": "Edge.app",
130130
},
131131
build_file_content = """
132132
load("@aspect_rules_js//js:defs.bzl", "js_library")
@@ -143,8 +143,8 @@ js_library(
143143

144144
deb_archive(
145145
name = "linux_edge",
146-
url = "https://packages.microsoft.com/repos/edge/pool/main/m/microsoft-edge-stable/microsoft-edge-stable_128.0.2739.79-1_amd64.deb",
147-
sha256 = "6238024b9d240927b76bb199021fe6e804d04759b61992638871755f5cc444f5",
146+
url = "https://packages.microsoft.com/repos/edge/pool/main/m/microsoft-edge-stable/microsoft-edge-stable_129.0.2792.65-1_amd64.deb",
147+
sha256 = "c6e0ad1e9b44d821b86a263b82edac596dca9b8a9f07413f2ff3c100221a28e7",
148148
build_file_content = """
149149
load("@aspect_rules_js//js:defs.bzl", "js_library")
150150
package(default_visibility = ["//visibility:public"])
@@ -165,8 +165,8 @@ js_library(
165165

166166
http_archive(
167167
name = "linux_edgedriver",
168-
url = "https://msedgedriver.azureedge.net/128.0.2739.81/edgedriver_linux64.zip",
169-
sha256 = "66a7b7fca41920c813263642ee5be105bb3b18f89fa09319a3b681ccf608aeb5",
168+
url = "https://msedgedriver.azureedge.net/129.0.2792.65/edgedriver_linux64.zip",
169+
sha256 = "36811ca6700532a98c27f696f79aa06762d882408645e6d6a09f3ed2673a6951",
170170
build_file_content = """
171171
load("@aspect_rules_js//js:defs.bzl", "js_library")
172172
package(default_visibility = ["//visibility:public"])
@@ -182,8 +182,8 @@ js_library(
182182

183183
http_archive(
184184
name = "mac_edgedriver",
185-
url = "https://msedgedriver.azureedge.net/128.0.2739.81/edgedriver_mac64.zip",
186-
sha256 = "554b60f5863f13db237bbba75fa8bac52517c364104dc859df0b457804ed10c9",
185+
url = "https://msedgedriver.azureedge.net/129.0.2792.65/edgedriver_mac64.zip",
186+
sha256 = "53d7dd53564cf20aaf51d505b364f28d30a83d38b87a08d6bf22d26e04d17c2b",
187187
build_file_content = """
188188
load("@aspect_rules_js//js:defs.bzl", "js_library")
189189
package(default_visibility = ["//visibility:public"])
@@ -199,8 +199,8 @@ js_library(
199199

200200
http_archive(
201201
name = "linux_chrome",
202-
url = "https://storage.googleapis.com/chrome-for-testing-public/129.0.6668.58/linux64/chrome-linux64.zip",
203-
sha256 = "0918cb647b186f6e429a90e67a716489cf96d0295da8a3a8c40a441379708ba9",
202+
url = "https://storage.googleapis.com/chrome-for-testing-public/129.0.6668.89/linux64/chrome-linux64.zip",
203+
sha256 = "fd61ba345c840c6d5404d8abdb42c5d86832b212e9bc401a72dc86495c0cd7d3",
204204
build_file_content = """
205205
load("@aspect_rules_js//js:defs.bzl", "js_library")
206206
package(default_visibility = ["//visibility:public"])
@@ -221,8 +221,8 @@ js_library(
221221

222222
http_archive(
223223
name = "mac_chrome",
224-
url = "https://storage.googleapis.com/chrome-for-testing-public/129.0.6668.58/mac-x64/chrome-mac-x64.zip",
225-
sha256 = "2f1c317cde0ba19be2f4e731cb77fc0b45ec423781c099ae5208228abedd1359",
224+
url = "https://storage.googleapis.com/chrome-for-testing-public/129.0.6668.89/mac-x64/chrome-mac-x64.zip",
225+
sha256 = "dd67b65ed1eac994032b02d48c6aaeef7c0a20ba0450bf124e2fb558a1ab4a1b",
226226
strip_prefix = "chrome-mac-x64",
227227
patch_cmds = [
228228
"mv 'Google Chrome for Testing.app' Chrome.app",
@@ -243,8 +243,8 @@ js_library(
243243

244244
http_archive(
245245
name = "linux_chromedriver",
246-
url = "https://storage.googleapis.com/chrome-for-testing-public/129.0.6668.58/linux64/chromedriver-linux64.zip",
247-
sha256 = "0fc68a18a9db153e98521ca1654bb3fd7842ad4552f98ec8ec6688e907efd9b1",
246+
url = "https://storage.googleapis.com/chrome-for-testing-public/129.0.6668.89/linux64/chromedriver-linux64.zip",
247+
sha256 = "0dafb169734d3fc79171cabcecb07131bfb6a1727859118b756a020211b6c804",
248248
strip_prefix = "chromedriver-linux64",
249249
build_file_content = """
250250
load("@aspect_rules_js//js:defs.bzl", "js_library")
@@ -261,8 +261,8 @@ js_library(
261261

262262
http_archive(
263263
name = "mac_chromedriver",
264-
url = "https://storage.googleapis.com/chrome-for-testing-public/129.0.6668.58/mac-x64/chromedriver-mac-x64.zip",
265-
sha256 = "df4df07aa534e1c082c252e54959c4caf2af1eed3d4631852e683971ffdec6cb",
264+
url = "https://storage.googleapis.com/chrome-for-testing-public/129.0.6668.89/mac-x64/chromedriver-mac-x64.zip",
265+
sha256 = "71663c3f70fe3eb2256c474c60fa7ee1c15065f38b6c679e6c2d46960e774b1e",
266266
strip_prefix = "chromedriver-mac-x64",
267267
build_file_content = """
268268
load("@aspect_rules_js//js:defs.bzl", "js_library")

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/BiDi/Communication/Transport/WebSocketTransport.cs

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@ public class WebSocketTransport(Uri _uri) : ITransport, IDisposable
1616
private readonly ClientWebSocket _webSocket = new();
1717
private readonly ArraySegment<byte> _receiveBuffer = new(new byte[1024 * 8]);
1818

19+
private readonly SemaphoreSlim _socketSendSemaphoreSlim = new(1, 1);
20+
1921
public async Task ConnectAsync(CancellationToken cancellationToken)
2022
{
21-
_webSocket.Options.SetBuffer(_receiveBuffer.Count, _receiveBuffer.Count, _receiveBuffer);
2223
await _webSocket.ConnectAsync(_uri, cancellationToken).ConfigureAwait(false);
2324
}
2425

@@ -32,8 +33,9 @@ public async Task<T> ReceiveAsJsonAsync<T>(JsonSerializerOptions jsonSerializerO
3233
{
3334
result = await _webSocket.ReceiveAsync(_receiveBuffer, cancellationToken).ConfigureAwait(false);
3435

35-
await ms.WriteAsync(_receiveBuffer.Array!, _receiveBuffer.Offset, result.Count).ConfigureAwait(false);
36-
} while (!result.EndOfMessage);
36+
await ms.WriteAsync(_receiveBuffer.Array!, _receiveBuffer.Offset, result.Count, cancellationToken).ConfigureAwait(false);
37+
}
38+
while (!result.EndOfMessage);
3739

3840
ms.Seek(0, SeekOrigin.Begin);
3941

@@ -51,12 +53,21 @@ public async Task SendAsJsonAsync(Command command, JsonSerializerOptions jsonSer
5153
{
5254
var buffer = JsonSerializer.SerializeToUtf8Bytes(command, typeof(Command), jsonSerializerOptions);
5355

54-
if (_logger.IsEnabled(LogEventLevel.Trace))
56+
await _socketSendSemaphoreSlim.WaitAsync(cancellationToken);
57+
58+
try
5559
{
56-
_logger.Trace($"BiDi SND >> {buffer.Length} > {Encoding.UTF8.GetString(buffer)}");
57-
}
60+
if (_logger.IsEnabled(LogEventLevel.Trace))
61+
{
62+
_logger.Trace($"BiDi SND >> {buffer.Length} > {Encoding.UTF8.GetString(buffer)}");
63+
}
5864

59-
await _webSocket.SendAsync(new ArraySegment<byte>(buffer), WebSocketMessageType.Text, true, cancellationToken).ConfigureAwait(false);
65+
await _webSocket.SendAsync(new ArraySegment<byte>(buffer), WebSocketMessageType.Text, true, cancellationToken).ConfigureAwait(false);
66+
}
67+
finally
68+
{
69+
_socketSendSemaphoreSlim.Release();
70+
}
6071
}
6172

6273
public void Dispose()

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
}

0 commit comments

Comments
 (0)