Skip to content

Commit 5e5bf3f

Browse files
committed
Merge branch 'trunk' into rb_fix_dependancy_issue
Signed-off-by: Viet Nguyen Duc <nguyenducviet4496@gmail.com>
2 parents c9b4a2f + 029ee43 commit 5e5bf3f

File tree

40 files changed

+496
-81
lines changed

40 files changed

+496
-81
lines changed

.github/workflows/ci-rbe.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
with:
1616
name: Check format script run
1717
caching: false
18-
ruby-version: jruby-9.4.9.0
18+
ruby-version: jruby-9.4.12.0
1919
run: ./scripts/github-actions/check-format.sh
2020

2121
test:
@@ -25,5 +25,5 @@ jobs:
2525
with:
2626
name: All RBE tests
2727
caching: false
28-
ruby-version: jruby-9.4.9.0
28+
ruby-version: jruby-9.4.12.0
2929
run: ./scripts/github-actions/ci-build.sh

.github/workflows/ci-renovate-rbe.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
with:
4848
name: Check format script run
4949
caching: false
50-
ruby-version: jruby-9.4.9.0
50+
ruby-version: jruby-9.4.12.0
5151
run: ./scripts/github-actions/check-format.sh
5252

5353
test:
@@ -58,7 +58,7 @@ jobs:
5858
with:
5959
name: All RBE tests
6060
caching: false
61-
ruby-version: jruby-9.4.9.0
61+
ruby-version: jruby-9.4.12.0
6262
run: ./scripts/github-actions/ci-build.sh
6363

6464
ci-gh:

.github/workflows/ci-ruby.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
os: macos
4848
- ruby-version: 3.3.5
4949
os: ubuntu
50-
- ruby-version: jruby-9.4.9.0
50+
- ruby-version: jruby-9.4.12.0
5151
os: ubuntu
5252
- ruby-version: truffleruby-24.1.1
5353
os: ubuntu

.github/workflows/pre-release.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ jobs:
6666
persist-credentials: false
6767
fetch-depth: 0
6868
fetch-tags: true
69-
ref: release-${{ github.event.inputs.version }}
69+
ref: trunk
7070
- name: Install Ruby
7171
uses: ruby/setup-ruby@v1
7272
with:
@@ -78,8 +78,6 @@ jobs:
7878
run: |
7979
git config --local user.email "selenium-ci@users.noreply.github.com"
8080
git config --local user.name "Selenium CI Bot"
81-
- name: Undo rust changelog commit
82-
run: git reset HEAD~1
8381
- name: Update everything including early release CDP
8482
if: ${{ github.event.inputs.chrome_channel == 'early-stable' }}
8583
run: ./go all:prepare[${{ github.event.inputs.version }},Beta]

Rakefile

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1110,7 +1110,11 @@ namespace :all do
11101110
'rb/lib/selenium/webdriver/version.rb',
11111111
'rb/CHANGES',
11121112
'rb/Gemfile.lock',
1113-
'rust/CHANGELOG.md'])
1113+
'rust/CHANGELOG.md',
1114+
'rust/BUILD.bazel',
1115+
'rust/Cargo.Bazel.lock',
1116+
'rust/Cargo.toml',
1117+
'rust/Cargo.lock'])
11141118
end
11151119

11161120
desc 'Update all versions'
@@ -1122,6 +1126,7 @@ namespace :all do
11221126
Rake::Task['node:version'].invoke(version)
11231127
Rake::Task['py:version'].invoke(version)
11241128
Rake::Task['dotnet:version'].invoke(version)
1129+
Rake::Task['rust:version'].invoke(version)
11251130
end
11261131
end
11271132

@@ -1186,7 +1191,11 @@ end
11861191

11871192
def update_changelog(version, language, path, changelog, header)
11881193
tag = previous_tag(version, language)
1189-
log = `git --no-pager log #{tag}...HEAD --pretty=format:"--> %B" --reverse #{path}`
1194+
log = if language == 'javascript'
1195+
`git --no-pager log #{tag}...HEAD --pretty=format:"- %s" --reverse #{path}`
1196+
else
1197+
`git --no-pager log #{tag}...HEAD --pretty=format:"* %s" --reverse #{path}`
1198+
end
11901199
commits = log.split('>>>').map { |entry|
11911200
lines = entry.split("\n")
11921201
lines.reject! { |line| line.match?(/^(----|Co-authored|Signed-off)/) || line.empty? }

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/134.0.2/linux-x86_64/en-US/firefox-134.0.2.tar.bz2",
15-
sha256 = "980b8cdebd7abdbed30a560a1a564d429c4e832c9e24e407b4c8a9fec24e0109",
14+
url = "https://ftp.mozilla.org/pub/firefox/releases/135.0/linux-x86_64/en-US/firefox-135.0.tar.xz",
15+
sha256 = "6fcc1a2f95a6b232af82b4b7644566638c5df349e3095c65b7c18d1a63412d3d",
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/134.0.2/mac/en-US/Firefox%20134.0.2.dmg",
37-
sha256 = "7832a8d1e1a13322dec1b52d32e1e64d2b6254de8348575f2d22af4975d56a85",
36+
url = "https://ftp.mozilla.org/pub/firefox/releases/135.0/mac/en-US/Firefox%20135.0.dmg",
37+
sha256 = "e55e24e6b2a4980f4b9091900835977b282f599dcdd5e38b753d95bad8a11da9",
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/135.0b9/linux-x86_64/en-US/firefox-135.0b9.tar.xz",
54-
sha256 = "a5aa65623c3ad4b6884b7617db0f7635880e042d1ed02376f52d8065884be03f",
53+
url = "https://ftp.mozilla.org/pub/firefox/releases/136.0b7/linux-x86_64/en-US/firefox-136.0b7.tar.xz",
54+
sha256 = "a8a7458f9ddd921634bbec9c93783ce01c592551ddd69884feb6152bc5f0711f",
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/135.0b9/mac/en-US/Firefox%20135.0b9.dmg",
76-
sha256 = "31d395ddc49b5f18863c2e060610d3a7089a4af46df12d73f1d56d5afe78baa3",
75+
url = "https://ftp.mozilla.org/pub/firefox/releases/136.0b7/mac/en-US/Firefox%20136.0b7.dmg",
76+
sha256 = "579481e264f1cccda8be3e35c475ac15e64eee235975c0df3a362e35eb109dd2",
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/32cc7c00-5d56-4296-81bc-798f79706d6c/MicrosoftEdge-132.0.2957.127.pkg",
127-
sha256 = "dc5d6fc311d0a93dc9a665051738c5f855c95e24ae49d5696c68148f14daa97e",
126+
url = "https://msedge.sf.dl.delivery.mp.microsoft.com/filestreamingservice/files/1f23240b-ab7b-4f22-9b0f-dd3fc2639c09/MicrosoftEdge-133.0.3065.69.pkg",
127+
sha256 = "5ea3058eb400e8d92d7861ce303a9b58f30d28c64b05945d5e5f0513e6dc8b6b",
128128
move = {
129-
"MicrosoftEdge-132.0.2957.127.pkg/Payload/Microsoft Edge.app": "Edge.app",
129+
"MicrosoftEdge-133.0.3065.69.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_132.0.2957.127-1_amd64.deb",
147-
sha256 = "ba80bca3192b3168269146e09fb38fdb596911a74a6666f81de6f7db312f7631",
146+
url = "https://packages.microsoft.com/repos/edge/pool/main/m/microsoft-edge-stable/microsoft-edge-stable_133.0.3065.69-1_amd64.deb",
147+
sha256 = "22b3029aa8a037394a59a1e26b098bfab25a02b30c60e73d92de82c9371d7d17",
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/132.0.2957.127/edgedriver_linux64.zip",
169-
sha256 = "d5a40743779e52d81ca4f0073ff47965347f9e906cac75f35fda0222480b78dc",
168+
url = "https://msedgedriver.azureedge.net/133.0.3065.69/edgedriver_linux64.zip",
169+
sha256 = "3fa6dd0bde636d414acec5f26dac59938050ff8e4efbb075385b75d3e81c882d",
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/132.0.2957.127/edgedriver_mac64.zip",
186-
sha256 = "0f73b6612245fcf5b719f27bc964832b25e349bfc64173b56e4ed26ca040ac64",
185+
url = "https://msedgedriver.azureedge.net/133.0.3065.69/edgedriver_mac64.zip",
186+
sha256 = "b2e76b705162f0d7e43bca8e7ff7549ede3008fd34e035790b2211a44868601a",
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/132.0.6834.159/linux64/chrome-linux64.zip",
203-
sha256 = "955bbbe5bfc2c210eced0c8faf5bc4aca4640af63b33f7480a4c2fc0b449e6e6",
202+
url = "https://storage.googleapis.com/chrome-for-testing-public/133.0.6943.98/linux64/chrome-linux64.zip",
203+
sha256 = "ab8524e2d3667c7b5f9df6a1e77e74229e9b620e75eafac65a6fd768c8cd8083",
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/132.0.6834.159/mac-x64/chrome-mac-x64.zip",
225-
sha256 = "f7ce763afa87bf90bbc834f9abd82a975519fc3e5b78d4caae88183fbd85736d",
224+
url = "https://storage.googleapis.com/chrome-for-testing-public/133.0.6943.98/mac-x64/chrome-mac-x64.zip",
225+
sha256 = "a6bc9d20cbc267db68fb50508ff564389c1ca5fa8b1e055731f4b8856fcf2fb7",
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/132.0.6834.159/linux64/chromedriver-linux64.zip",
247-
sha256 = "13930d2b5e5f69d15c206556bd66e623aa325d03edde091b169b7cc5f7880e3e",
246+
url = "https://storage.googleapis.com/chrome-for-testing-public/133.0.6943.98/linux64/chromedriver-linux64.zip",
247+
sha256 = "7103e779223f0d4f9e97a583708e589ad76622475e1346fdb3b223694d58245d",
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/132.0.6834.159/mac-x64/chromedriver-mac-x64.zip",
265-
sha256 = "50639151eaff168e7a55325120e11ceaa4b0cdedb5bb6df65511319f064dac2f",
264+
url = "https://storage.googleapis.com/chrome-for-testing-public/133.0.6943.98/mac-x64/chromedriver-mac-x64.zip",
265+
sha256 = "f026a658f8dc5a4e199a0932083f7a56d49eb1ae0afc565ef14be8db68d9dc75",
266266
strip_prefix = "chromedriver-mac-x64",
267267
build_file_content = """
268268
load("@aspect_rules_js//js:defs.bzl", "js_library")

dotnet/src/webdriver/BiDi/Modules/Script/LocalValue.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@ public abstract record PrimitiveProtocolLocalValue : LocalValue
7777

7878
}
7979

80-
public record Number(long Value) : PrimitiveProtocolLocalValue
80+
public record Number(double Value) : PrimitiveProtocolLocalValue
8181
{
82-
public static explicit operator Number(int n) => new Number(n);
82+
public static explicit operator Number(double n) => new Number(n);
8383
}
8484

8585
public record String(string Value) : PrimitiveProtocolLocalValue;

dotnet/src/webdriver/BiDi/Modules/Script/RemoteValue.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ namespace OpenQA.Selenium.BiDi.Modules.Script;
5656
public abstract record RemoteValue
5757
{
5858
public static implicit operator int(RemoteValue remoteValue) => (int)((Number)remoteValue).Value;
59-
public static implicit operator long(RemoteValue remoteValue) => ((Number)remoteValue).Value;
59+
public static implicit operator long(RemoteValue remoteValue) => (long)((Number)remoteValue).Value;
6060
public static implicit operator string(RemoteValue remoteValue)
6161
{
6262
return remoteValue switch
@@ -93,7 +93,7 @@ public static implicit operator string(RemoteValue remoteValue)
9393
throw new BiDiException("Cannot convert .....");
9494
}
9595

96-
public record Number(long Value) : PrimitiveProtocolRemoteValue;
96+
public record Number(double Value) : PrimitiveProtocolRemoteValue;
9797

9898
public record Boolean(bool Value) : PrimitiveProtocolRemoteValue;
9999

dotnet/src/webdriver/Remote/HttpCommandExecutor.cs

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -221,19 +221,39 @@ protected virtual void OnSendingRemoteHttpRequest(SendingRemoteHttpRequestEventA
221221
this.SendingRemoteHttpRequest?.Invoke(this, eventArgs);
222222
}
223223

224-
private HttpClient CreateHttpClient()
224+
/// <summary>
225+
/// Creates an instance of <see cref="HttpClientHandler"/> as underlying handler,
226+
/// used by <see cref="CreateHttpClient"/>. Invoked only once when required.
227+
/// </summary>
228+
/// <returns>An instance of <see cref="HttpClientHandler"/>.</returns>
229+
protected virtual HttpClientHandler CreateHttpClientHandler()
225230
{
226-
HttpClientHandler httpClientHandler = new HttpClientHandler();
231+
HttpClientHandler httpClientHandler = new();
232+
227233
string userInfo = this.remoteServerUri.UserInfo;
228-
if (!string.IsNullOrEmpty(userInfo) && userInfo.Contains(":"))
234+
235+
if (!string.IsNullOrEmpty(userInfo) && userInfo.Contains(':'))
229236
{
230-
string[] userInfoComponents = this.remoteServerUri.UserInfo.Split(new char[] { ':' }, 2);
237+
string[] userInfoComponents = this.remoteServerUri.UserInfo.Split([':'], 2);
231238
httpClientHandler.Credentials = new NetworkCredential(userInfoComponents[0], userInfoComponents[1]);
232239
httpClientHandler.PreAuthenticate = true;
233240
}
234241

235242
httpClientHandler.Proxy = this.Proxy;
236243

244+
return httpClientHandler;
245+
}
246+
247+
/// <summary>
248+
/// Creates an instance of <see cref="HttpClient"/> used by making all HTTP calls to remote end.
249+
/// Invoked only once when required.
250+
/// </summary>
251+
/// <returns>An instance of <see cref="HttpClient"/>.</returns>
252+
protected virtual HttpClient CreateHttpClient()
253+
{
254+
var httpClientHandler = CreateHttpClientHandler()
255+
?? throw new InvalidOperationException($"{nameof(CreateHttpClientHandler)} method returned null");
256+
237257
HttpMessageHandler handler = httpClientHandler;
238258

239259
if (_logger.IsEnabled(LogEventLevel.Trace))
@@ -242,15 +262,18 @@ private HttpClient CreateHttpClient()
242262
}
243263

244264
var client = new HttpClient(handler);
265+
245266
client.DefaultRequestHeaders.UserAgent.ParseAdd(this.UserAgent);
246267
client.DefaultRequestHeaders.Accept.ParseAdd(RequestAcceptHeader);
247268
client.DefaultRequestHeaders.ExpectContinue = false;
269+
248270
if (!this.IsKeepAliveEnabled)
249271
{
250272
client.DefaultRequestHeaders.Connection.ParseAdd("close");
251273
}
252274

253275
client.Timeout = this.serverResponseTimeout;
276+
254277
return client;
255278
}
256279

dotnet/test/common/BiDi/Script/CallFunctionParameterTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public async Task CanCallFunctionWithDeclarationImplicitCast()
4646
[Test]
4747
public async Task CanEvaluateScriptWithUserActivationTrue()
4848
{
49-
await context.Script.EvaluateAsync("window.open();", true, new() { UserActivation = true });
49+
await context.Script.EvaluateAsync("window.open();", true);
5050

5151
var res = await context.Script.CallFunctionAsync<bool>("""
5252
() => navigator.userActivation.isActive && navigator.userActivation.hasBeenActive

0 commit comments

Comments
 (0)