Skip to content

Commit 6d54614

Browse files
authored
Merge branch 'trunk' into renovate/material-ui-monorepo
2 parents 290ee7b + 66e4787 commit 6d54614

File tree

84 files changed

+2877
-640
lines changed

Some content is hidden

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

84 files changed

+2877
-640
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ py/docs/source/**/*
7878
!py/docs/source/conf.py
7979
!py/docs/source/*.rst
8080
py/build/
81-
py/LICENSE
8281
py/pytestdebug.log
8382
py/python.iml
8483
selenium.egg-info/

.skipped-tests

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
-//dotnet/test/common:NetworkInterceptionTests-chrome
22
-//dotnet/test/common:NetworkInterceptionTests-edge
3+
-//dotnet/test/firefox:FirefoxDriverTest-firefox
34
-//java/test/org/openqa/selenium/chrome:ChromeDriverFunctionalTest
45
-//java/test/org/openqa/selenium/chrome:ChromeDriverFunctionalTest-remote
56
-//java/test/org/openqa/selenium/edge:EdgeDriverFunctionalTest

MODULE.bazel

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -181,11 +181,12 @@ maven.install(
181181
"com.google.code.findbugs:jsr305:3.0.2",
182182
"com.google.code.gson:gson:2.13.1",
183183
"com.google.guava:guava:33.4.8-jre",
184+
"com.github.ben-manes.caffeine:caffeine:3.2.2",
184185
"com.google.auto:auto-common:1.2.2",
185186
"com.google.auto.service:auto-service:1.1.1",
186187
"com.google.auto.service:auto-service-annotations:1.1.1",
187-
"com.google.googlejavaformat:google-java-format:1.27.0",
188-
"com.graphql-java:graphql-java:22.3",
188+
"com.google.googlejavaformat:google-java-format:1.28.0",
189+
"com.graphql-java:graphql-java:24.1",
189190
"dev.failsafe:failsafe:3.3.2",
190191
"io.grpc:grpc-context:1.73.0",
191192
"io.lettuce:lettuce-core:6.7.1.RELEASE",
@@ -209,7 +210,7 @@ maven.install(
209210
"net.bytebuddy:byte-buddy:1.17.6",
210211
"org.htmlunit:htmlunit-core-js:4.13.0",
211212
"org.apache.commons:commons-exec:1.5.0",
212-
"org.apache.logging.log4j:log4j-core:2.25.0",
213+
"org.apache.logging.log4j:log4j-core:2.25.1",
213214
"org.assertj:assertj-core:3.27.3",
214215
"org.bouncycastle:bcpkix-jdk18on:1.81",
215216
"org.eclipse.mylyn.github:org.eclipse.egit.github.core:2.1.5",
@@ -232,9 +233,9 @@ maven.install(
232233
"uk.org.webcompere:system-stubs-core:2.1.8",
233234
],
234235
boms = [
235-
"io.opentelemetry:opentelemetry-bom:1.51.0",
236+
"io.opentelemetry:opentelemetry-bom:1.52.0",
236237
"io.netty:netty-bom:4.1.121.Final",
237-
"org.junit:junit-bom:5.13.2",
238+
"org.junit:junit-bom:5.13.4",
238239
],
239240
excluded_artifacts = [
240241
"org.hamcrest:hamcrest-all", # Replaced by hamcrest 2

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -528,8 +528,6 @@ To update API documentation for a specific language: `./go <language>:docs`
528528

529529
To update all documentation: `./go all:docs`
530530

531-
Note that JavaScript generation is [currently broken](https://github.com/SeleniumHQ/selenium/issues/10185).
532-
533531

534532
## Releasing
535533

common/selenium_manager.bzl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,22 @@ def selenium_manager():
66
http_file(
77
name = "download_sm_linux",
88
executable = True,
9-
sha256 = "50099355b0e74b8bb231a5b152fc3de498dcde1cdebcefb1e501713e9b124b9d",
10-
url = "https://github.com/SeleniumHQ/selenium_manager_artifacts/releases/download/selenium-manager-0ab9b6d/selenium-manager-linux",
9+
sha256 = "f615ae2eea714a54e322f8945c7abb19e03e0f5d651b464bd5cd9e9ecf9e7c90",
10+
url = "https://github.com/SeleniumHQ/selenium_manager_artifacts/releases/download/selenium-manager-9d09338/selenium-manager-linux",
1111
)
1212

1313
http_file(
1414
name = "download_sm_macos",
1515
executable = True,
16-
sha256 = "eb98ce344acfaee3a7d58038331a8b49985ac724d2a9ec02258008c076979846",
17-
url = "https://github.com/SeleniumHQ/selenium_manager_artifacts/releases/download/selenium-manager-0ab9b6d/selenium-manager-macos",
16+
sha256 = "88fede46d14991930aab3176f6938ddb7549ab244f6d75a9745050d625274852",
17+
url = "https://github.com/SeleniumHQ/selenium_manager_artifacts/releases/download/selenium-manager-9d09338/selenium-manager-macos",
1818
)
1919

2020
http_file(
2121
name = "download_sm_windows",
2222
executable = True,
23-
sha256 = "7090d5737aebabb9daad49022b070d3456b8e43ae7f3ac5bcb780af67c371b3f",
24-
url = "https://github.com/SeleniumHQ/selenium_manager_artifacts/releases/download/selenium-manager-0ab9b6d/selenium-manager-windows.exe",
23+
sha256 = "a7e8a7e0f561e7d8238f8aa884ef2dd6235884d3b0e97f25061747dbf4ec5037",
24+
url = "https://github.com/SeleniumHQ/selenium_manager_artifacts/releases/download/selenium-manager-9d09338/selenium-manager-windows.exe",
2525
)
2626

2727
def _selenium_manager_artifacts_impl(_ctx):

dotnet/src/webdriver/BUILD.bazel

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -162,21 +162,21 @@ csharp_library(
162162
)
163163

164164
copy_file(
165-
name = "readme",
166-
src = "//dotnet/src/webdriver/assets:README.md",
165+
name = "assets-nuget-readme",
166+
src = "//dotnet/src/webdriver/assets:nuget/README.md",
167167
out = "README.md",
168168
)
169169

170170
copy_file(
171-
name = "props",
172-
src = "//dotnet/src/webdriver/assets:Selenium.WebDriver.targets",
171+
name = "assets-nuget-build-netstandard20-targets",
172+
src = "//dotnet/src/webdriver/assets:nuget/build/netstandard2.0/Selenium.WebDriver.targets",
173173
out = "Selenium.WebDriver.targets",
174174
)
175175

176176
copy_file(
177-
name = "transitive-props",
178-
src = "//dotnet/src/webdriver/assets:Selenium.WebDriver.targets",
179-
out = "transitive.Selenium.WebDriver.targets",
177+
name = "assets-nuget-buildtransitive-netstandard20-targets",
178+
src = "//dotnet/src/webdriver/assets:nuget/buildTransitive/netstandard2.0/Selenium.WebDriver.targets",
179+
out = "transitiveSelenium.WebDriver.targets",
180180
)
181181

182182
copy_file(
@@ -207,9 +207,9 @@ nuget_pack(
207207
"//common/manager:selenium-manager-linux": "manager/linux/selenium-manager",
208208
"//common/manager:selenium-manager-macos": "manager/macos/selenium-manager",
209209
"//common/manager:selenium-manager-windows": "manager/windows/selenium-manager.exe",
210-
":readme": "README.md",
211-
":props": "build/Selenium.WebDriver.targets",
212-
":transitive-props": "buildTransitive/Selenium.WebDriver.targets",
210+
":assets-nuget-readme": "README.md",
211+
":assets-nuget-build-netstandard20-targets": "build/netstandard2.0/Selenium.WebDriver.targets",
212+
":assets-nuget-buildtransitive-netstandard20-targets": "buildTransitive/netstandard2.0/Selenium.WebDriver.targets",
213213
},
214214
id = "Selenium.WebDriver",
215215
libs = {
@@ -233,9 +233,9 @@ nuget_pack(
233233
"//common/manager:selenium-manager-linux": "manager/linux/selenium-manager",
234234
"//common/manager:selenium-manager-macos": "manager/macos/selenium-manager",
235235
"//common/manager:selenium-manager-windows": "manager/windows/selenium-manager.exe",
236-
":readme": "README.md",
237-
":props": "build/Selenium.WebDriver.StrongNamed.targets",
238-
":transitive-props": "buildTransitive/Selenium.WebDriver.StrongNamed.targets",
236+
":assets-nuget-readme": "README.md",
237+
":assets-nuget-build-netstandard20-targets": "build/netstandard2.0/Selenium.WebDriver.StrongNamed.targets",
238+
":assets-nuget-buildtransitive-netstandard20-targets": "buildTransitive/netstandard2.0/Selenium.WebDriver.StrongNamed.targets",
239239
},
240240
id = "Selenium.WebDriver.StrongNamed",
241241
libs = {

dotnet/src/webdriver/BiDi/BiDi.cs

Lines changed: 29 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,13 @@
1818
// </copyright>
1919

2020
using System;
21+
using System.Threading;
2122
using System.Threading.Tasks;
2223
using OpenQA.Selenium.BiDi.Communication;
2324

2425
namespace OpenQA.Selenium.BiDi;
2526

26-
public class BiDi : IAsyncDisposable
27+
public sealed class BiDi : IAsyncDisposable
2728
{
2829
private readonly Broker _broker;
2930

@@ -38,7 +39,7 @@ public class BiDi : IAsyncDisposable
3839

3940
private readonly object _moduleLock = new();
4041

41-
internal BiDi(string url)
42+
private BiDi(string url)
4243
{
4344
var uri = new Uri(url);
4445

@@ -49,15 +50,10 @@ internal Session.SessionModule SessionModule
4950
{
5051
get
5152
{
52-
if (_sessionModule is null)
53+
if (_sessionModule is not null) return _sessionModule;
54+
lock (_moduleLock)
5355
{
54-
lock (_moduleLock)
55-
{
56-
if (_sessionModule is null)
57-
{
58-
_sessionModule = new Session.SessionModule(_broker);
59-
}
60-
}
56+
_sessionModule ??= new Session.SessionModule(_broker);
6157
}
6258
return _sessionModule;
6359
}
@@ -67,15 +63,10 @@ public BrowsingContext.BrowsingContextModule BrowsingContext
6763
{
6864
get
6965
{
70-
if (_browsingContextModule is null)
66+
if (_browsingContextModule is not null) return _browsingContextModule;
67+
lock (_moduleLock)
7168
{
72-
lock (_moduleLock)
73-
{
74-
if (_browsingContextModule is null)
75-
{
76-
_browsingContextModule = new BrowsingContext.BrowsingContextModule(_broker);
77-
}
78-
}
69+
_browsingContextModule ??= new BrowsingContext.BrowsingContextModule(_broker);
7970
}
8071
return _browsingContextModule;
8172
}
@@ -85,15 +76,10 @@ public Browser.BrowserModule Browser
8576
{
8677
get
8778
{
88-
if (_browserModule is null)
79+
if (_browserModule is not null) return _browserModule;
80+
lock (_moduleLock)
8981
{
90-
lock (_moduleLock)
91-
{
92-
if (_browserModule is null)
93-
{
94-
_browserModule = new Browser.BrowserModule(_broker);
95-
}
96-
}
82+
_browserModule ??= new Browser.BrowserModule(_broker);
9783
}
9884
return _browserModule;
9985
}
@@ -103,15 +89,10 @@ public Network.NetworkModule Network
10389
{
10490
get
10591
{
106-
if (_networkModule is null)
92+
if (_networkModule is not null) return _networkModule;
93+
lock (_moduleLock)
10794
{
108-
lock (_moduleLock)
109-
{
110-
if (_networkModule is null)
111-
{
112-
_networkModule = new Network.NetworkModule(_broker);
113-
}
114-
}
95+
_networkModule ??= new Network.NetworkModule(_broker);
11596
}
11697
return _networkModule;
11798
}
@@ -121,15 +102,10 @@ internal Input.InputModule InputModule
121102
{
122103
get
123104
{
124-
if (_inputModule is null)
105+
if (_inputModule is not null) return _inputModule;
106+
lock (_moduleLock)
125107
{
126-
lock (_moduleLock)
127-
{
128-
if (_inputModule is null)
129-
{
130-
_inputModule = new Input.InputModule(_broker);
131-
}
132-
}
108+
_inputModule ??= new Input.InputModule(_broker);
133109
}
134110
return _inputModule;
135111
}
@@ -139,15 +115,10 @@ public Script.ScriptModule Script
139115
{
140116
get
141117
{
142-
if (_scriptModule is null)
118+
if (_scriptModule is not null) return _scriptModule;
119+
lock (_moduleLock)
143120
{
144-
lock (_moduleLock)
145-
{
146-
if (_scriptModule is null)
147-
{
148-
_scriptModule = new Script.ScriptModule(_broker);
149-
}
150-
}
121+
_scriptModule ??= new Script.ScriptModule(_broker);
151122
}
152123
return _scriptModule;
153124
}
@@ -157,15 +128,10 @@ public Log.LogModule Log
157128
{
158129
get
159130
{
160-
if (_logModule is null)
131+
if (_logModule is not null) return _logModule;
132+
lock (_moduleLock)
161133
{
162-
lock (_moduleLock)
163-
{
164-
if (_logModule is null)
165-
{
166-
_logModule = new Log.LogModule(_broker);
167-
}
168-
}
134+
_logModule ??= new Log.LogModule(_broker);
169135
}
170136
return _logModule;
171137
}
@@ -175,15 +141,10 @@ public Storage.StorageModule Storage
175141
{
176142
get
177143
{
178-
if (_storageModule is null)
144+
if (_storageModule is not null) return _storageModule;
145+
lock (_moduleLock)
179146
{
180-
lock (_moduleLock)
181-
{
182-
if (_storageModule is null)
183-
{
184-
_storageModule = new Storage.StorageModule(_broker);
185-
}
186-
}
147+
_storageModule ??= new Storage.StorageModule(_broker);
187148
}
188149
return _storageModule;
189150
}
@@ -198,7 +159,7 @@ public static async Task<BiDi> ConnectAsync(string url)
198159
{
199160
var bidi = new BiDi(url);
200161

201-
await bidi._broker.ConnectAsync(default).ConfigureAwait(false);
162+
await bidi._broker.ConnectAsync(CancellationToken.None).ConfigureAwait(false);
202163

203164
return bidi;
204165
}
@@ -209,13 +170,8 @@ public Task EndAsync(Session.EndOptions? options = null)
209170
}
210171

211172
public async ValueTask DisposeAsync()
212-
{
213-
await DisposeAsyncCore();
214-
GC.SuppressFinalize(this);
215-
}
216-
217-
protected virtual async ValueTask DisposeAsyncCore()
218173
{
219174
await _broker.DisposeAsync().ConfigureAwait(false);
175+
GC.SuppressFinalize(this);
220176
}
221177
}

dotnet/src/webdriver/Internal/Logging/ConsoleLogHandler.cs renamed to dotnet/src/webdriver/BiDi/BiDiOptions.cs

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// <copyright file="ConsoleLogHandler.cs" company="Selenium Committers">
1+
// <copyright file="BiDiOptions.cs" company="Selenium Committers">
22
// Licensed to the Software Freedom Conservancy (SFC) under one
33
// or more contributor license agreements. See the NOTICE file
44
// distributed with this work for additional information
@@ -17,12 +17,8 @@
1717
// under the License.
1818
// </copyright>
1919

20-
using System;
20+
namespace OpenQA.Selenium.BiDi;
2121

22-
namespace OpenQA.Selenium.Internal.Logging;
23-
24-
/// <summary>
25-
/// Represents a log handler that writes log events to the given text writer.
26-
/// </summary>
27-
[Obsolete("Use TextWriterHandler instead, will be removed in v4.32")]
28-
public class ConsoleLogHandler() : TextWriterHandler(Console.Error);
22+
public sealed class BiDiOptions
23+
{
24+
}

dotnet/src/webdriver/BiDi/Browser/BrowserModule.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ namespace OpenQA.Selenium.BiDi.Browser;
2424

2525
public sealed class BrowserModule(Broker broker) : Module(broker)
2626
{
27-
public async Task CloseAsync(CloseOptions? options = null)
27+
public async Task<EmptyResult> CloseAsync(CloseOptions? options = null)
2828
{
29-
await Broker.ExecuteCommandAsync(new CloseCommand(), options).ConfigureAwait(false);
29+
return await Broker.ExecuteCommandAsync<CloseCommand, EmptyResult>(new CloseCommand(), options).ConfigureAwait(false);
3030
}
3131

3232
public async Task<UserContextInfo> CreateUserContextAsync(CreateUserContextOptions? options = null)
@@ -41,11 +41,11 @@ public async Task<GetUserContextsResult> GetUserContextsAsync(GetUserContextsOpt
4141
return await Broker.ExecuteCommandAsync<GetUserContextsCommand, GetUserContextsResult>(new GetUserContextsCommand(), options).ConfigureAwait(false);
4242
}
4343

44-
public async Task RemoveUserContextAsync(UserContext userContext, RemoveUserContextOptions? options = null)
44+
public async Task<EmptyResult> RemoveUserContextAsync(UserContext userContext, RemoveUserContextOptions? options = null)
4545
{
4646
var @params = new RemoveUserContextCommandParameters(userContext);
4747

48-
await Broker.ExecuteCommandAsync(new RemoveUserContextCommand(@params), options).ConfigureAwait(false);
48+
return await Broker.ExecuteCommandAsync<RemoveUserContextCommand, EmptyResult>(new RemoveUserContextCommand(@params), options).ConfigureAwait(false);
4949
}
5050

5151
public async Task<GetClientWindowsResult> GetClientWindowsAsync(GetClientWindowsOptions? options = null)

0 commit comments

Comments
 (0)