Skip to content

Commit 7a34685

Browse files
authored
Merge branch 'trunk' into dotnet-getcookie-endpoint
2 parents 6724a7f + 398a082 commit 7a34685

File tree

71 files changed

+2122
-1424
lines changed

Some content is hidden

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

71 files changed

+2122
-1424
lines changed

.bazelversion

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7.3.1
1+
7.4.1

.github/workflows/bazel.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,12 @@ jobs:
8282
steps:
8383
- name: Checkout source tree
8484
uses: actions/checkout@v4
85-
- name: Pull latest changes
86-
if: startsWith(github.head_ref, 'renovate/')
85+
- name: Pull latest changes from head ref for PRs
86+
if: contains(github.head_ref, 'renovate/')
8787
run: git pull origin ${{ github.head_ref }}
88+
- name: Pull latest changes from ref for branch pushes
89+
if: contains(github.ref, 'renovate/')
90+
run: git pull origin ${{ github.ref }}
8891
- name: Free space
8992
if: inputs.os != 'windows'
9093
run: ./scripts/github-actions/free-disk-space.sh

.github/workflows/stale.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
stale-issue-message: 'This issue is stale because it has been open 280 days with no activity. Remove stale label or comment or this will be closed in 14 days.'
2222
close-issue-message: 'This issue was closed because it has been stalled for 14 days with no activity.'
2323
stale-issue-label: 'I-stale'
24-
days-before-stale: 280
24+
days-before-stale: 180
2525
days-before-close: 14
2626
- uses: actions/stale@v9
2727
with:

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@
187187
same "printed page" as the copyright notice for easier
188188
identification within third-party archives.
189189

190-
Copyright 2024 Software Freedom Conservancy (SFC)
190+
Copyright 2025 Software Freedom Conservancy (SFC)
191191

192192
Licensed under the Apache License, Version 2.0 (the "License");
193193
you may not use this file except in compliance with the License.

MODULE.bazel

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
module(name = "selenium")
22

33
bazel_dep(name = "apple_rules_lint", version = "0.4.0")
4-
bazel_dep(name = "aspect_bazel_lib", version = "2.8.1")
4+
bazel_dep(name = "aspect_bazel_lib", version = "2.10.0")
55
bazel_dep(name = "aspect_rules_esbuild", version = "0.21.0")
66
bazel_dep(name = "aspect_rules_js", version = "2.0.1")
77
bazel_dep(name = "aspect_rules_ts", version = "3.1.0")
8-
bazel_dep(name = "bazel_features", version = "1.13.0")
8+
bazel_dep(name = "bazel_features", version = "1.23.0")
99
bazel_dep(name = "bazel_skylib", version = "1.7.1")
1010
bazel_dep(name = "buildifier_prebuilt", version = "6.4.0")
1111
bazel_dep(name = "contrib_rules_jvm", version = "0.27.0")
1212
bazel_dep(name = "platforms", version = "0.0.10")
1313

1414
# Required for the closure rules
15-
bazel_dep(name = "protobuf", version = "29.1", dev_dependency = True, repo_name = "com_google_protobuf")
15+
bazel_dep(name = "protobuf", version = "29.2", dev_dependency = True, repo_name = "com_google_protobuf")
1616

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.16.1")
21-
bazel_dep(name = "rules_java", version = "7.11.1")
20+
bazel_dep(name = "rules_dotnet", version = "0.17.5")
21+
bazel_dep(name = "rules_java", version = "7.12.4")
2222
bazel_dep(name = "rules_jvm_external", version = "6.6")
23-
bazel_dep(name = "rules_nodejs", version = "6.3.0")
24-
bazel_dep(name = "rules_oci", version = "1.7.6")
23+
bazel_dep(name = "rules_nodejs", version = "6.3.2")
24+
bazel_dep(name = "rules_oci", version = "1.8.0")
2525
bazel_dep(name = "rules_pkg", version = "0.10.1")
2626
bazel_dep(name = "rules_python", version = "0.33.0")
2727
bazel_dep(name = "rules_proto", version = "6.0.2")
@@ -169,19 +169,19 @@ maven.install(
169169
name = "maven",
170170
artifacts = [
171171
"com.beust:jcommander:1.82",
172-
"com.github.javaparser:javaparser-core:3.26.2",
172+
"com.github.javaparser:javaparser-core:3.26.3",
173173
"com.github.spotbugs:spotbugs:4.8.6",
174174
"com.github.stephenc.jcip:jcip-annotations:1.0-1",
175175
"com.google.code.gson:gson:2.11.0",
176-
"com.google.guava:guava:33.3.1-jre",
176+
"com.google.guava:guava:33.4.0-jre",
177177
"com.google.auto:auto-common:1.2.2",
178178
"com.google.auto.service:auto-service:1.1.1",
179179
"com.google.auto.service:auto-service-annotations:1.1.1",
180-
"com.google.googlejavaformat:google-java-format:jar:1.25.0",
180+
"com.google.googlejavaformat:google-java-format:1.25.2:1.25.0",
181181
"com.graphql-java:graphql-java:22.3",
182182
"dev.failsafe:failsafe:3.3.2",
183-
"io.grpc:grpc-context:1.68.1",
184-
"io.lettuce:lettuce-core:6.5.0.RELEASE",
183+
"io.grpc:grpc-context:1.69.0",
184+
"io.lettuce:lettuce-core:6.5.2.RELEASE",
185185
"io.netty:netty-buffer",
186186
"io.netty:netty-codec-http",
187187
"io.netty:netty-codec-http2",
@@ -200,11 +200,11 @@ maven.install(
200200
"io.opentelemetry:opentelemetry-sdk-trace",
201201
"io.opentelemetry.semconv:opentelemetry-semconv:1.28.0-alpha",
202202
"it.ozimov:embedded-redis:0.7.3",
203-
"net.bytebuddy:byte-buddy:1.15.10",
204-
"org.htmlunit:htmlunit-core-js:4.6.0",
203+
"net.bytebuddy:byte-buddy:1.15.11",
204+
"org.htmlunit:htmlunit-core-js:4.7.0",
205205
"org.apache.commons:commons-exec:1.4.0",
206-
"org.apache.logging.log4j:log4j-core:2.24.1",
207-
"org.assertj:assertj-core:3.26.3",
206+
"org.apache.logging.log4j:log4j-core:2.24.3",
207+
"org.assertj:assertj-core:3.27.2",
208208
"org.bouncycastle:bcpkix-jdk18on:1.79",
209209
"org.eclipse.mylyn.github:org.eclipse.egit.github.core:2.1.5",
210210
"org.hsqldb:hsqldb:2.7.4",
@@ -217,7 +217,7 @@ maven.install(
217217
"org.junit.platform:junit-platform-commons",
218218
"org.junit.platform:junit-platform-engine",
219219
"org.mockito:mockito-core:5.14.2",
220-
"org.redisson:redisson:3.39.0",
220+
"org.redisson:redisson:3.41.0",
221221
"org.slf4j:slf4j-api:2.0.16",
222222
"org.slf4j:slf4j-jdk14:2.0.16",
223223
"org.tomlj:tomlj:1.1.1",

NOTICE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Copyright 2011-2024 Software Freedom Conservancy
1+
Copyright 2011-2025 Software Freedom Conservancy
22
Copyright 2004-2011 Selenium committers
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>FedCM Example</title>
5+
</head>
6+
<body>
7+
<button id="triggerButton" onclick="triggerFedCm()">Trigger FedCM</button>
8+
<div id="result"></div>
9+
10+
<script>
11+
// Use a relative path for the configURL
12+
let configURL = `http://${location.host}/common/fedcm/config.json`;
13+
console.log(configURL)
14+
let result = null;
15+
16+
async function triggerFedCm() {
17+
console.log("Config URL:", configURL);
18+
try {
19+
let promise = await navigator.credentials.get({
20+
identity: {
21+
providers: [{
22+
configURL: configURL,
23+
clientId: '1',
24+
}]
25+
}
26+
});
27+
result = promise;
28+
29+
console.log("Promised!")
30+
console.log(result)
31+
document.getElementById('result').innerText = JSON.stringify(result);
32+
} catch (error) {
33+
console.error("FedCM Error:", error);
34+
result = { error: error.message };
35+
document.getElementById('result').innerText = JSON.stringify(result);
36+
}
37+
}
38+
</script>
39+
</body>
40+
</html>

dotnet/paket.nuget.bzl

Lines changed: 46 additions & 46 deletions
Large diffs are not rendered by default.

dotnet/src/webdriver/DevTools/DevToolsCommandData.cs

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

20+
using System.Text.Json;
2021
using System.Text.Json.Nodes;
2122
using System.Text.Json.Serialization;
2223
using System.Threading;
@@ -90,7 +91,7 @@ public DevToolsCommandData(long commandId, string sessionId, string commandName,
9091
/// Get or sets the result of the command execution.
9192
/// </summary>
9293
[JsonIgnore]
93-
public JsonNode Result { get; set; }
94+
public JsonElement Result { get; set; }
9495

9596
/// <summary>
9697
/// Gets or sets a value indicating whether the command resulted in an error response.

dotnet/src/webdriver/DevTools/DevToolsSession.cs

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ public T GetVersionSpecificDomains<T>() where T : DevToolsSessionDomains
168168
throw new InvalidOperationException($"Type {command.GetType()} does not correspond to a known command response type.");
169169
}
170170

171-
return result.Deserialize(commandResponseType) as ICommandResponse<TCommand>;
171+
return result.Value.Deserialize(commandResponseType) as ICommandResponse<TCommand>;
172172
}
173173

174174
/// <summary>
@@ -201,7 +201,7 @@ public T GetVersionSpecificDomains<T>() where T : DevToolsSessionDomains
201201
throw new InvalidOperationException($"Type {typeof(TCommand)} does not correspond to a known command response type.");
202202
}
203203

204-
return result.Deserialize(commandResponseType) as ICommandResponse<TCommand>;
204+
return result.Value.Deserialize(commandResponseType) as ICommandResponse<TCommand>;
205205
}
206206

207207
/// <summary>
@@ -230,7 +230,7 @@ public T GetVersionSpecificDomains<T>() where T : DevToolsSessionDomains
230230
return default(TCommandResponse);
231231
}
232232

233-
return result.Deserialize<TCommandResponse>();
233+
return result.Value.Deserialize<TCommandResponse>();
234234
}
235235

236236
/// <summary>
@@ -243,7 +243,7 @@ public T GetVersionSpecificDomains<T>() where T : DevToolsSessionDomains
243243
/// <param name="throwExceptionIfResponseNotReceived"><see langword="true"/> to throw an exception if a response is not received; otherwise, <see langword="false"/>.</param>
244244
/// <returns>The command response object implementing the <see cref="ICommandResponse{T}"/> interface.</returns>
245245
//[DebuggerStepThrough]
246-
public async Task<JsonNode> SendCommand(string commandName, JsonNode commandParameters, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
246+
public async Task<JsonElement?> SendCommand(string commandName, JsonNode commandParameters, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
247247
{
248248
if (this.attachedTargetId == null)
249249
{
@@ -265,7 +265,7 @@ public T GetVersionSpecificDomains<T>() where T : DevToolsSessionDomains
265265
/// <param name="throwExceptionIfResponseNotReceived"><see langword="true"/> to throw an exception if a response is not received; otherwise, <see langword="false"/>.</param>
266266
/// <returns>The command response object implementing the <see cref="ICommandResponse{T}"/> interface.</returns>
267267
//[DebuggerStepThrough]
268-
public async Task<JsonNode> SendCommand(string commandName, string sessionId, JsonNode commandParameters, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
268+
public async Task<JsonElement?> SendCommand(string commandName, string sessionId, JsonNode commandParameters, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
269269
{
270270
if (millisecondsTimeout.HasValue == false)
271271
{
@@ -298,8 +298,8 @@ public T GetVersionSpecificDomains<T>() where T : DevToolsSessionDomains
298298
{
299299
if (modified.IsError)
300300
{
301-
var errorMessage = modified.Result["message"].GetValue<string>();
302-
var errorData = modified.Result["data"]?.GetValue<string>();
301+
var errorMessage = modified.Result.GetProperty("message").GetString();
302+
var errorData = modified.Result.TryGetProperty("data", out var data) ? data.GetString() : null;
303303

304304
var exceptionMessage = $"{commandName}: {errorMessage}";
305305
if (!string.IsNullOrWhiteSpace(errorData))
@@ -310,7 +310,7 @@ public T GetVersionSpecificDomains<T>() where T : DevToolsSessionDomains
310310
LogTrace("Recieved Error Response {0}: {1} {2}", modified.CommandId, message, errorData);
311311
throw new CommandResponseException(exceptionMessage)
312312
{
313-
Code = modified.Result["code"]?.GetValue<long>() ?? -1
313+
Code = modified.Result.TryGetProperty("code", out var code) ? code.GetInt64() : -1
314314
};
315315
}
316316

@@ -559,23 +559,27 @@ private void ProcessMessage(string message)
559559
logger.Trace($"CDP RCV << {message}");
560560
}
561561

562-
var messageObject = JsonObject.Parse(message).AsObject();
562+
JsonElement messageObject;
563+
using (var doc = JsonDocument.Parse(message))
564+
{
565+
messageObject = doc.RootElement.Clone();
566+
}
563567

564-
if (messageObject.TryGetPropertyValue("id", out var idProperty))
568+
if (messageObject.TryGetProperty("id", out var idProperty))
565569
{
566-
long commandId = (long)idProperty;
570+
long commandId = idProperty.GetInt64();
567571

568572
DevToolsCommandData commandInfo;
569573
if (this.pendingCommands.TryGetValue(commandId, out commandInfo))
570574
{
571-
if (messageObject.TryGetPropertyValue("error", out var errorProperty))
575+
if (messageObject.TryGetProperty("error", out var errorProperty))
572576
{
573577
commandInfo.IsError = true;
574578
commandInfo.Result = errorProperty;
575579
}
576580
else
577581
{
578-
commandInfo.Result = messageObject["result"];
582+
commandInfo.Result = messageObject.GetProperty("result");
579583
LogTrace("Recieved Response {0}: {1}", commandId, commandInfo.Result.ToString());
580584
}
581585

@@ -594,11 +598,11 @@ private void ProcessMessage(string message)
594598
return;
595599
}
596600

597-
if (messageObject.TryGetPropertyValue("method", out var methodProperty))
601+
if (messageObject.TryGetProperty("method", out var methodProperty))
598602
{
599-
var method = (string)methodProperty;
603+
var method = methodProperty.GetString();
600604
var methodParts = method.Split(new char[] { '.' }, 2);
601-
var eventData = messageObject["params"];
605+
var eventData = messageObject.GetProperty("params");
602606

603607
LogTrace("Recieved Event {0}: {1}", method, eventData.ToString());
604608

0 commit comments

Comments
 (0)