Skip to content

Commit acf0610

Browse files
authored
Merge branch 'SeleniumHQ:trunk' into py-selenium-manager-arm-support
2 parents b448457 + fc5d766 commit acf0610

File tree

30 files changed

+504
-377
lines changed

30 files changed

+504
-377
lines changed

.idea/misc.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.skipped-tests

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,4 @@
5151
-//rb/spec/integration/selenium/webdriver:element-chrome
5252
-//rb/spec/integration/selenium/webdriver:element-chrome-bidi
5353
-//rb/spec/integration/selenium/webdriver:element-chrome-remote
54-
-//rb/spec/integration/selenium/webdriver:manager-firefox-beta
55-
-//rb/spec/integration/selenium/webdriver:manager-firefox-beta-remote
5654
-//rb:lint

CONTRIBUTING.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,10 @@ the defect. If the issue can't be reproduced it will be closed.
1414
Please provide [concise reproducible test cases](http://sscce.org/)
1515
and describe what results you are seeing and what results you expect.
1616

17-
Issues shouldn't be used for support. Please address questions to the
18-
[`selenium-users@` mailing list](https://groups.google.com/forum/#!forum/selenium-users).
17+
Issues shouldn't be used for support. To raise a bug, please go to the
18+
[Issue tracker](https://github.com/SeleniumHQ/selenium/issues).
1919
Discussion of high level project ideas or non-technical topics should
20-
move to the
21-
[`selenium-developers@` mailing list](https://groups.google.com/forum/#!forum/selenium-developers)
22-
instead.
20+
move to the Selenium [Slack channel](https://inviter.co/seleniumhq).
2321

2422
We also need help with triaging
2523
[issues that needs investigation](https://github.com/SeleniumHQ/selenium/labels/I-needs%20investigation).
@@ -34,7 +32,6 @@ with details describing what feature(s) you'd like added or changed.
3432

3533
If you'd like a hand at trying to implement the feature yourself, please refer to the [Code Contributions](#code-contributions) section of the document.
3634

37-
3835
## Documentation
3936

4037
Selenium is a big software project and documentation is key to

MODULE.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ bazel_dep(name = "platforms", version = "0.0.11")
1515
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
18-
bazel_dep(name = "rules_cc", version = "0.1.1", dev_dependency = True)
18+
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")

common/repositories.bzl

Lines changed: 24 additions & 24 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/141.0.3/linux-x86_64/en-US/firefox-141.0.3.tar.xz",
15-
sha256 = "e935dc3b74cf2cb1086e1e0b4a51d18e4d307e71ce6a20db64fe49d09cc78716",
14+
url = "https://ftp.mozilla.org/pub/firefox/releases/142.0/linux-x86_64/en-US/firefox-142.0.tar.xz",
15+
sha256 = "da8897a6a618e73878e6022a2bece76af509c304c73ae5c53dc523d35cb7bae6",
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/141.0.3/mac/en-US/Firefox%20141.0.3.dmg",
37-
sha256 = "bb922cda690543bddaa1fbc3b3cba508c60774832643452bc266595331f42db1",
36+
url = "https://ftp.mozilla.org/pub/firefox/releases/142.0/mac/en-US/Firefox%20142.0.dmg",
37+
sha256 = "cc0ce6b3ec64d064c16187f92ca4a8df5a21a1d7aa2f79a9e82b44602f2b1a0f",
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/142.0b9/linux-x86_64/en-US/firefox-142.0b9.tar.xz",
54-
sha256 = "0e230f54a1d933df55e0d730c7d774437e60b5fdcbd74401f5da69bce184c30b",
53+
url = "https://ftp.mozilla.org/pub/firefox/releases/143.0b2/linux-x86_64/en-US/firefox-143.0b2.tar.xz",
54+
sha256 = "70a8af598dedca123b72422811ec04e5a28060778d4a86622f4ecd400f234a78",
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/142.0b9/mac/en-US/Firefox%20142.0b9.dmg",
76-
sha256 = "529509a53278d8cbd482fa8ef95ac243b33c6cc4acc7924c15f6ce3f59c64bbf",
75+
url = "https://ftp.mozilla.org/pub/firefox/releases/143.0b2/mac/en-US/Firefox%20143.0b2.dmg",
76+
sha256 = "52f9a7a944f857b207bc79f66ae2d600ff8736264d708d6c0fa5138aea664f97",
7777
build_file_content = """
7878
load("@aspect_rules_js//js:defs.bzl", "js_library")
7979
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/139.0.7258.68/linux64/chrome-linux64.zip",
203-
sha256 = "57966f0d19e7c4294d89e7fa25b1a6f0801475c3d51cf708597d5af9a9e474f8",
202+
url = "https://storage.googleapis.com/chrome-for-testing-public/139.0.7258.138/linux64/chrome-linux64.zip",
203+
sha256 = "a28ed679a017b8042747d81f7855cb86cc71402b268fc843b57533e69a835a17",
204204
build_file_content = """
205205
load("@aspect_rules_js//js:defs.bzl", "js_library")
206206
package(default_visibility = ["//visibility:public"])
@@ -220,8 +220,8 @@ js_library(
220220
)
221221
http_archive(
222222
name = "mac_chrome",
223-
url = "https://storage.googleapis.com/chrome-for-testing-public/139.0.7258.68/mac-x64/chrome-mac-x64.zip",
224-
sha256 = "a49442c4cc6a28faeeecde16d27b5b8a1c5306020788c81160f2a19388ecf645",
223+
url = "https://storage.googleapis.com/chrome-for-testing-public/139.0.7258.138/mac-x64/chrome-mac-x64.zip",
224+
sha256 = "e910233cc746230abb5d9c855a191fceee0729e299ac15cb562260be302fa64b",
225225
strip_prefix = "chrome-mac-x64",
226226
patch_cmds = [
227227
"mv 'Google Chrome for Testing.app' Chrome.app",
@@ -241,8 +241,8 @@ js_library(
241241
)
242242
http_archive(
243243
name = "linux_chromedriver",
244-
url = "https://storage.googleapis.com/chrome-for-testing-public/139.0.7258.68/linux64/chromedriver-linux64.zip",
245-
sha256 = "ec29104132a6ff1ae5f2ffe7b27b7ff675a58ab9b1ef616badcbdd35577b31b3",
244+
url = "https://storage.googleapis.com/chrome-for-testing-public/139.0.7258.138/linux64/chromedriver-linux64.zip",
245+
sha256 = "b5940d93d97da3d98dba0d4f5a67246b839a8e5634d69a6d625d0ad54bed8bb2",
246246
strip_prefix = "chromedriver-linux64",
247247
build_file_content = """
248248
load("@aspect_rules_js//js:defs.bzl", "js_library")
@@ -259,8 +259,8 @@ js_library(
259259

260260
http_archive(
261261
name = "mac_chromedriver",
262-
url = "https://storage.googleapis.com/chrome-for-testing-public/139.0.7258.68/mac-x64/chromedriver-mac-x64.zip",
263-
sha256 = "2b9787f5f758c9f3e3888ac23270f8de47b168679718a4440bd1cea2b3cc57e9",
262+
url = "https://storage.googleapis.com/chrome-for-testing-public/139.0.7258.138/mac-x64/chromedriver-mac-x64.zip",
263+
sha256 = "c6e2a630d72e0017649d54f29a93caa617fac0f846c23b2bd6494d8fe92e4479",
264264
strip_prefix = "chromedriver-mac-x64",
265265
build_file_content = """
266266
load("@aspect_rules_js//js:defs.bzl", "js_library")
@@ -277,8 +277,8 @@ js_library(
277277

278278
http_archive(
279279
name = "linux_beta_chrome",
280-
url = "https://storage.googleapis.com/chrome-for-testing-public/140.0.7339.16/linux64/chrome-linux64.zip",
281-
sha256 = "ced1841af7400a153e23cef3e39a7f9247034a0f1ce845b36b22904920db63e2",
280+
url = "https://storage.googleapis.com/chrome-for-testing-public/140.0.7339.24/linux64/chrome-linux64.zip",
281+
sha256 = "d2371e5f2ea9cf349a48103ff8c95e83f0ec6a97ff5e7dad951fb73096413d1b",
282282
build_file_content = """
283283
load("@aspect_rules_js//js:defs.bzl", "js_library")
284284
package(default_visibility = ["//visibility:public"])
@@ -298,8 +298,8 @@ js_library(
298298
)
299299
http_archive(
300300
name = "mac_beta_chrome",
301-
url = "https://storage.googleapis.com/chrome-for-testing-public/140.0.7339.16/mac-x64/chrome-mac-x64.zip",
302-
sha256 = "dcc3d96ad192f15f10089b7a92fb429ba0a934f4820eecc3af44f0d961b4bcf5",
301+
url = "https://storage.googleapis.com/chrome-for-testing-public/140.0.7339.24/mac-x64/chrome-mac-x64.zip",
302+
sha256 = "1eeec20838e918be14b6f5d4773fa3a1afedd8e81ff20611a59e0d54c5c3fb3d",
303303
strip_prefix = "chrome-mac-x64",
304304
patch_cmds = [
305305
"mv 'Google Chrome for Testing.app' Chrome.app",
@@ -319,8 +319,8 @@ js_library(
319319
)
320320
http_archive(
321321
name = "linux_beta_chromedriver",
322-
url = "https://storage.googleapis.com/chrome-for-testing-public/140.0.7339.16/linux64/chromedriver-linux64.zip",
323-
sha256 = "f40639ecc590adea9583a15066afd8e2e3e84173435dc4e31d9b01afcc41bd66",
322+
url = "https://storage.googleapis.com/chrome-for-testing-public/140.0.7339.24/linux64/chromedriver-linux64.zip",
323+
sha256 = "a908e9d9bf547c5b2d73e441d18ba16a0ee8a980c0ad8a0aaf9c3b42d03f5569",
324324
strip_prefix = "chromedriver-linux64",
325325
build_file_content = """
326326
load("@aspect_rules_js//js:defs.bzl", "js_library")
@@ -337,8 +337,8 @@ js_library(
337337

338338
http_archive(
339339
name = "mac_beta_chromedriver",
340-
url = "https://storage.googleapis.com/chrome-for-testing-public/140.0.7339.16/mac-x64/chromedriver-mac-x64.zip",
341-
sha256 = "931126b95bdaed2ae63001195c8506011d6e7d2554b61462c82e19671602978b",
340+
url = "https://storage.googleapis.com/chrome-for-testing-public/140.0.7339.24/mac-x64/chromedriver-mac-x64.zip",
341+
sha256 = "1b785a93d4dd848942064268428ca186a122d6a64c5aaf7fe2c6c8b1debcb34f",
342342
strip_prefix = "chromedriver-mac-x64",
343343
build_file_content = """
344344
load("@aspect_rules_js//js:defs.bzl", "js_library")

dotnet/src/webdriver/BiDi/BrowsingContext/CaptureScreenshotCommand.cs

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

2020
using OpenQA.Selenium.BiDi.Communication;
21+
using System;
2122
using System.Text.Json.Serialization;
2223

2324
namespace OpenQA.Selenium.BiDi.BrowsingContext;
@@ -56,9 +57,9 @@ public sealed record BoxClipRectangle(double X, double Y, double Width, double H
5657

5758
public sealed record ElementClipRectangle(Script.ISharedReference Element) : ClipRectangle;
5859

59-
public sealed record CaptureScreenshotResult(string Data) : EmptyResult
60+
public sealed record CaptureScreenshotResult(ReadOnlyMemory<byte> Data) : EmptyResult
6061
{
6162
public static implicit operator byte[](CaptureScreenshotResult captureScreenshotResult) => captureScreenshotResult.ToByteArray();
6263

63-
public byte[] ToByteArray() => System.Convert.FromBase64String(Data);
64+
public byte[] ToByteArray() => Data.ToArray();
6465
}

dotnet/src/webdriver/BiDi/BrowsingContext/PrintCommand.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ public static implicit operator PrintPageRange(Range range)
112112
#endif
113113
}
114114

115-
public sealed record PrintResult(string Data) : EmptyResult
115+
public sealed record PrintResult(ReadOnlyMemory<byte> Data) : EmptyResult
116116
{
117-
public byte[] ToByteArray() => Convert.FromBase64String(Data);
117+
public byte[] ToByteArray() => Data.ToArray();
118118
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ internal Broker(BiDi bidi, Uri url)
8484
new RealmConverter(_bidi),
8585
new RealmTypeConverter(),
8686
new DateTimeOffsetConverter(),
87+
new TimeSpanConverter(),
8788
new PrintPageRangeConverter(),
8889
new InputOriginConverter(),
8990
new WebExtensionConverter(_bidi),

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

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,7 @@ internal class DateTimeOffsetConverter : JsonConverter<DateTimeOffset>
2727
{
2828
public override DateTimeOffset Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
2929
{
30-
// Workaround: it should be Int64, chrome uses double for `expiry` like "expiry":1737379944.308351
31-
32-
if (reader.TryGetInt64(out long unixTime) is false)
33-
{
34-
var doubleValue = reader.GetDouble();
35-
36-
unixTime = Convert.ToInt64(doubleValue);
37-
}
38-
39-
return DateTimeOffset.FromUnixTimeMilliseconds(unixTime);
30+
return DateTimeOffset.FromUnixTimeMilliseconds(reader.GetInt64());
4031
}
4132

4233
public override void Write(Utf8JsonWriter writer, DateTimeOffset value, JsonSerializerOptions options)
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
// <copyright file="TimeSpanConverter.cs" company="Selenium Committers">
2+
// Licensed to the Software Freedom Conservancy (SFC) under one
3+
// or more contributor license agreements. See the NOTICE file
4+
// distributed with this work for additional information
5+
// regarding copyright ownership. The SFC licenses this file
6+
// to you under the Apache License, Version 2.0 (the
7+
// "License"); you may not use this file except in compliance
8+
// with the License. You may obtain a copy of the License at
9+
//
10+
// http://www.apache.org/licenses/LICENSE-2.0
11+
//
12+
// Unless required by applicable law or agreed to in writing,
13+
// software distributed under the License is distributed on an
14+
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
// KIND, either express or implied. See the License for the
16+
// specific language governing permissions and limitations
17+
// under the License.
18+
// </copyright>
19+
20+
using System;
21+
using System.Text.Json;
22+
using System.Text.Json.Serialization;
23+
24+
namespace OpenQA.Selenium.BiDi.Communication.Json.Converters;
25+
26+
internal class TimeSpanConverter : JsonConverter<TimeSpan>
27+
{
28+
public override TimeSpan Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
29+
{
30+
if (reader.TryGetInt64(out long milliseconds) is false)
31+
{
32+
var doubleValue = reader.GetDouble();
33+
34+
milliseconds = Convert.ToInt64(doubleValue);
35+
}
36+
37+
return TimeSpan.FromMilliseconds(milliseconds);
38+
}
39+
40+
public override void Write(Utf8JsonWriter writer, TimeSpan value, JsonSerializerOptions options)
41+
{
42+
writer.WriteNumberValue(value.TotalMilliseconds);
43+
}
44+
}

0 commit comments

Comments
 (0)