Skip to content

Commit 08b2a40

Browse files
authored
Merge branch 'SeleniumHQ:trunk' into py-websocket-clientconfig
2 parents 33b192f + fde053a commit 08b2a40

File tree

87 files changed

+959
-576
lines changed

Some content is hidden

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

87 files changed

+959
-576
lines changed

.github/workflows/ci-python.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ jobs:
2121
- name: Checkout source tree
2222
uses: actions/checkout@v4
2323
- name: Set up Python 3.9
24-
uses: actions/setup-python@v4
24+
uses: actions/setup-python@v6
2525
with:
2626
python-version: 3.9
2727
- name: Install dependencies
2828
run: |
2929
python -m pip install --upgrade pip
30-
pip install tox==4.27.0
30+
pip install tox==4.30.2
3131
- name: Generate docs
3232
run: tox -c py/tox.ini
3333
env:
@@ -41,13 +41,13 @@ jobs:
4141
- name: Checkout source tree
4242
uses: actions/checkout@v4
4343
- name: Set up Python 3.9
44-
uses: actions/setup-python@v4
44+
uses: actions/setup-python@v6
4545
with:
4646
python-version: 3.9
4747
- name: Install dependencies
4848
run: |
4949
python -m pip install --upgrade pip
50-
pip install tox==4.27.0
50+
pip install tox==4.30.2
5151
- name: Run type checking
5252
run: |
5353
tox -c py/tox.ini || true

.github/workflows/update-documentation.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ jobs:
6868
distribution: 'temurin'
6969
- name: Set up Python 3.9
7070
if: ${{ inputs.language == 'py' || inputs.language == 'all' }}
71-
uses: actions/setup-python@v5
71+
uses: actions/setup-python@v6
7272
with:
7373
python-version: 3.9
7474
- name: Install dependencies

MODULE.bazel

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ bazel_dep(name = "rules_cc", version = "0.2.0", dev_dependency = True)
1919

2020
bazel_dep(name = "rules_dotnet", version = "0.17.5")
2121
bazel_dep(name = "rules_java", version = "8.7.1")
22-
bazel_dep(name = "rules_jvm_external", version = "6.6")
22+
bazel_dep(name = "rules_jvm_external", version = "6.8")
2323
bazel_dep(name = "rules_multitool", version = "1.3.0")
2424
bazel_dep(name = "rules_nodejs", version = "6.3.2")
2525
bazel_dep(name = "rules_oci", version = "1.8.0")
@@ -29,12 +29,10 @@ bazel_dep(name = "rules_proto", version = "7.0.2")
2929
bazel_dep(name = "rules_ruby", version = "0.19.0")
3030

3131
# Until `rules_jvm_external` 6.8 ships
32-
git_override(
32+
single_version_override(
3333
module_name = "rules_jvm_external",
34-
commit = "aca619b117c1fe306ffdd20c5f47cc4dbd5effed",
3534
patch_strip = 1,
3635
patches = ["//java:rules_jvm_external_javadoc.patch"],
37-
remote = "https://github.com/bazel-contrib/rules_jvm_external.git",
3836
)
3937

4038
multitool = use_extension("@rules_multitool//multitool:extension.bzl", "multitool")
@@ -186,6 +184,8 @@ maven.install(
186184
"com.google.auto.service:auto-service:1.1.1",
187185
"com.google.auto.service:auto-service-annotations:1.1.1",
188186
"com.google.googlejavaformat:google-java-format:1.28.0",
187+
"com.google.protobuf:protobuf-java:3.25.5",
188+
"com.google.protobuf.nano:protobuf-javanano:3.1.0",
189189
"com.graphql-java:graphql-java:24.1",
190190
"dev.failsafe:failsafe:3.3.2",
191191
"io.grpc:grpc-context:1.74.0",
@@ -215,6 +215,7 @@ maven.install(
215215
"org.bouncycastle:bcpkix-jdk18on:1.81",
216216
"org.eclipse.mylyn.github:org.eclipse.egit.github.core:2.1.5",
217217
"org.hsqldb:hsqldb:2.7.4",
218+
"org.jboss.marshalling:jboss-marshalling:2.2.3.Final",
218219
"org.jspecify:jspecify:1.0.0",
219220
"org.junit.jupiter:junit-jupiter-api",
220221
"org.junit.jupiter:junit-jupiter-engine",
@@ -234,7 +235,7 @@ maven.install(
234235
],
235236
boms = [
236237
"io.opentelemetry:opentelemetry-bom:1.53.0",
237-
"io.netty:netty-bom:4.1.121.Final",
238+
"io.netty:netty-bom:4.2.4.Final",
238239
"org.junit:junit-bom:5.13.4",
239240
],
240241
excluded_artifacts = [

common/repositories.bzl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -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/017e25fc-2906-45b2-958c-1c71c4667dc1/MicrosoftEdge-139.0.3405.111.pkg",
127-
sha256 = "1aa42cbaaf38b035e17d43fbbe0a293ceb286c5fd298d463b1a369ed900a03ac",
126+
url = "https://msedge.sf.dl.delivery.mp.microsoft.com/filestreamingservice/files/95344cbf-d116-4494-8485-b96014e98901/MicrosoftEdge-139.0.3405.119.pkg",
127+
sha256 = "31b3ddce353180a706179d64086ed01b53cfd20a7daea45597a7e9e405fc553f",
128128
move = {
129-
"MicrosoftEdge-139.0.3405.111.pkg/Payload/Microsoft Edge.app": "Edge.app",
129+
"MicrosoftEdge-139.0.3405.119.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_139.0.3405.111-1_amd64.deb",
147-
sha256 = "d61b2fcef695083496184a6a323b2bcfb57d45af8fb6867ffe54974a5992dc52",
146+
url = "https://packages.microsoft.com/repos/edge/pool/main/m/microsoft-edge-stable/microsoft-edge-stable_139.0.3405.119-1_amd64.deb",
147+
sha256 = "e51e4e36cde5e7be2031fd9145ac9bf26444f734a88ff43858e05c7782e60c7b",
148148
build_file_content = """
149149
load("@aspect_rules_js//js:defs.bzl", "js_library")
150150
package(default_visibility = ["//visibility:public"])

common/src/web/data_url.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>Page containing an image encoded as a Data URL</title>
6+
</head>
7+
<body>
8+
<img src="data:image/gif;base64,R0lGODlhEAAQAMQAAORHHOVSKudfOulrSOp3WOyDZu6QdvCchPGolfO0o/XBs/fNwfjZ0frl3/zy7////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAkAABAALAAAAAAQABAAAAVVICSOZGlCQAosJ6mu7fiyZeKqNKToQGDsM8hBADgUXoGAiqhSvp5QAnQKGIgUhwFUYLCVDFCrKUE1lBavAViFIDlTImbKC5Gm2hB0SlBCBMQiB0UjIQA7" alt="star" id="data-url-image">
9+
</body>
10+
</html>

dotnet/src/webdriver/BiDi/Communication/Broker.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ internal Broker(BiDi bidi, Uri url)
8484
new RealmConverter(_bidi),
8585
new RealmTypeConverter(),
8686
new DateTimeOffsetConverter(),
87-
new TimeSpanConverter(),
8887
new PrintPageRangeConverter(),
8988
new InputOriginConverter(),
9089
new WebExtensionConverter(_bidi),

dotnet/src/webdriver/BiDi/Communication/Json/Converters/DateTimeOffsetConverter.cs

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,24 @@ internal class DateTimeOffsetConverter : JsonConverter<DateTimeOffset>
2727
{
2828
public override DateTimeOffset Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
2929
{
30-
return DateTimeOffset.FromUnixTimeMilliseconds(reader.GetInt64());
30+
return DateTimeOffset.FromUnixTimeMilliseconds((long)reader.GetDouble()); // still might get a double
3131
}
3232

3333
public override void Write(Utf8JsonWriter writer, DateTimeOffset value, JsonSerializerOptions options)
3434
{
3535
writer.WriteNumberValue(value.ToUnixTimeMilliseconds());
3636
}
3737
}
38+
39+
internal class DateTimeOffsetSecondsConverter : JsonConverter<DateTimeOffset>
40+
{
41+
public override DateTimeOffset Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
42+
{
43+
return DateTimeOffset.FromUnixTimeSeconds((long)reader.GetDouble()); // still might get a double
44+
}
45+
46+
public override void Write(Utf8JsonWriter writer, DateTimeOffset value, JsonSerializerOptions options)
47+
{
48+
writer.WriteNumberValue(value.ToUnixTimeSeconds());
49+
}
50+
}

dotnet/src/webdriver/BiDi/Communication/Json/Converters/TimeSpanConverter.cs

Lines changed: 0 additions & 44 deletions
This file was deleted.

dotnet/src/webdriver/BiDi/Network/Cookie.cs

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

20+
using OpenQA.Selenium.BiDi.Communication.Json.Converters;
2021
using System;
22+
using System.Text.Json.Serialization;
2123

2224
namespace OpenQA.Selenium.BiDi.Network;
2325

24-
public sealed record Cookie(string Name, BytesValue Value, string Domain, string Path, long Size, bool HttpOnly, bool Secure, SameSite SameSite, TimeSpan? Expiry);
26+
public sealed record Cookie(string Name, BytesValue Value, string Domain, string Path, long Size, bool HttpOnly, bool Secure, SameSite SameSite, [property: JsonConverter(typeof(DateTimeOffsetSecondsConverter))] DateTimeOffset? Expiry);
2527

2628
public enum SameSite
2729
{

dotnet/src/webdriver/BiDi/Storage/SetCookieCommand.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@
1818
// </copyright>
1919

2020
using OpenQA.Selenium.BiDi.Communication;
21+
using OpenQA.Selenium.BiDi.Communication.Json.Converters;
2122
using System;
23+
using System.Text.Json.Serialization;
2224

2325
namespace OpenQA.Selenium.BiDi.Storage;
2426

@@ -37,6 +39,7 @@ public sealed record PartialCookie(string Name, Network.BytesValue Value, string
3739

3840
public Network.SameSite? SameSite { get; set; }
3941

42+
[JsonConverter(typeof(DateTimeOffsetSecondsConverter))]
4043
public DateTimeOffset? Expiry { get; set; }
4144
}
4245

0 commit comments

Comments
 (0)