Skip to content

Commit e99739c

Browse files
authored
Merge branch 'trunk' into Issue_12549_FixAtomsGenerationLowdash
2 parents 96667c4 + 95fb4ce commit e99739c

File tree

146 files changed

+1616
-1298
lines changed

Some content is hidden

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

146 files changed

+1616
-1298
lines changed

.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 "[email protected]"
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]

.github/workflows/stale.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ jobs:
2323
stale-issue-label: 'I-stale'
2424
days-before-stale: 180
2525
days-before-close: 14
26+
exempt-all-milestones: true
2627
- uses: actions/stale@v9
2728
with:
2829
close-issue-message: 'This issue was closed because we did not receive any additional information after 14 days.'

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.0", dev_dependency = True)
18+
bazel_dep(name = "rules_cc", version = "0.1.1", dev_dependency = True)
1919

2020
bazel_dep(name = "rules_dotnet", version = "0.17.5")
2121
bazel_dep(name = "rules_java", version = "8.7.1")

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/Communication/Broker.cs

Lines changed: 37 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ internal Broker(BiDi bidi, ITransport transport)
7070
{
7171
new BrowsingContextConverter(_bidi),
7272
new BrowserUserContextConverter(bidi),
73+
new BrowserClientWindowConverter(),
7374
new NavigationConverter(),
7475
new InterceptConverter(_bidi),
7576
new RequestConverter(_bidi),
@@ -82,6 +83,7 @@ internal Broker(BiDi bidi, ITransport transport)
8283
new DateTimeOffsetConverter(),
8384
new PrintPageRangeConverter(),
8485
new InputOriginConverter(),
86+
new SubscriptionConverter(),
8587
new JsonStringEnumConverter(JsonNamingPolicy.CamelCase),
8688

8789
// https://github.com/dotnet/runtime/issues/72604
@@ -97,6 +99,7 @@ internal Broker(BiDi bidi, ITransport transport)
9799
new Json.Converters.Enumerable.LocateNodesResultConverter(),
98100
new Json.Converters.Enumerable.InputSourceActionsConverter(),
99101
new Json.Converters.Enumerable.GetUserContextsResultConverter(),
102+
new Json.Converters.Enumerable.GetClientWindowsResultConverter(),
100103
new Json.Converters.Enumerable.GetRealmsResultConverter(),
101104
}
102105
};
@@ -109,15 +112,17 @@ public async Task ConnectAsync(CancellationToken cancellationToken)
109112
await _transport.ConnectAsync(cancellationToken).ConfigureAwait(false);
110113

111114
_receiveMessagesCancellationTokenSource = new CancellationTokenSource();
112-
_receivingMessageTask = _myTaskFactory.StartNew(async () => await ReceiveMessagesAsync(_receiveMessagesCancellationTokenSource.Token), TaskCreationOptions.LongRunning).Unwrap();
113-
_eventEmitterTask = _myTaskFactory.StartNew(async () => await ProcessEventsAwaiterAsync(), TaskCreationOptions.LongRunning).Unwrap();
115+
_receivingMessageTask = _myTaskFactory.StartNew(async () => await ReceiveMessagesAsync(_receiveMessagesCancellationTokenSource.Token)).Unwrap();
116+
_eventEmitterTask = _myTaskFactory.StartNew(ProcessEventsAwaiterAsync).Unwrap();
114117
}
115118

116119
private async Task ReceiveMessagesAsync(CancellationToken cancellationToken)
117120
{
118121
while (!cancellationToken.IsCancellationRequested)
119122
{
120-
var message = await _transport.ReceiveAsJsonAsync<Message>(_jsonSerializerContext, cancellationToken);
123+
var data = await _transport.ReceiveAsync(cancellationToken).ConfigureAwait(false);
124+
125+
var message = JsonSerializer.Deserialize(new ReadOnlySpan<byte>(data), _jsonSerializerContext.Message);
121126

122127
switch (message)
123128
{
@@ -177,21 +182,21 @@ private async Task ProcessEventsAwaiterAsync()
177182
}
178183

179184
public async Task<TResult> ExecuteCommandAsync<TCommand, TResult>(TCommand command, CommandOptions? options)
180-
where TCommand: Command
185+
where TCommand : Command
181186
{
182187
var jsonElement = await ExecuteCommandCoreAsync(command, options).ConfigureAwait(false);
183188

184189
return (TResult)jsonElement.Deserialize(typeof(TResult), _jsonSerializerContext)!;
185190
}
186191

187192
public async Task ExecuteCommandAsync<TCommand>(TCommand command, CommandOptions? options)
188-
where TCommand: Command
193+
where TCommand : Command
189194
{
190195
await ExecuteCommandCoreAsync(command, options).ConfigureAwait(false);
191196
}
192197

193198
private async Task<JsonElement> ExecuteCommandCoreAsync<TCommand>(TCommand command, CommandOptions? options)
194-
where TCommand: Command
199+
where TCommand : Command
195200
{
196201
command.Id = Interlocked.Increment(ref _currentCommandId);
197202

@@ -205,7 +210,9 @@ private async Task<JsonElement> ExecuteCommandCoreAsync<TCommand>(TCommand comma
205210

206211
_pendingCommands[command.Id] = tcs;
207212

208-
await _transport.SendAsJsonAsync(command, _jsonSerializerContext, cts.Token).ConfigureAwait(false);
213+
var data = JsonSerializer.SerializeToUtf8Bytes(command, typeof(TCommand), _jsonSerializerContext);
214+
215+
await _transport.SendAsync(data, cts.Token).ConfigureAwait(false);
209216

210217
return await tcs.Task.ConfigureAwait(false);
211218
}
@@ -217,23 +224,23 @@ public async Task<Subscription> SubscribeAsync<TEventArgs>(string eventName, Act
217224

218225
if (options is BrowsingContextsSubscriptionOptions browsingContextsOptions)
219226
{
220-
await _bidi.SessionModule.SubscribeAsync([eventName], new() { Contexts = browsingContextsOptions.Contexts }).ConfigureAwait(false);
227+
var subscribeResult = await _bidi.SessionModule.SubscribeAsync([eventName], new() { Contexts = browsingContextsOptions.Contexts }).ConfigureAwait(false);
221228

222229
var eventHandler = new SyncEventHandler<TEventArgs>(eventName, action, browsingContextsOptions?.Contexts);
223230

224231
handlers.Add(eventHandler);
225232

226-
return new Subscription(this, eventHandler);
233+
return new Subscription(subscribeResult.Subscription, this, eventHandler);
227234
}
228235
else
229236
{
230-
await _bidi.SessionModule.SubscribeAsync([eventName]).ConfigureAwait(false);
237+
var subscribeResult = await _bidi.SessionModule.SubscribeAsync([eventName]).ConfigureAwait(false);
231238

232239
var eventHandler = new SyncEventHandler<TEventArgs>(eventName, action);
233240

234241
handlers.Add(eventHandler);
235242

236-
return new Subscription(this, eventHandler);
243+
return new Subscription(subscribeResult.Subscription, this, eventHandler);
237244
}
238245
}
239246

@@ -244,44 +251,51 @@ public async Task<Subscription> SubscribeAsync<TEventArgs>(string eventName, Fun
244251

245252
if (options is BrowsingContextsSubscriptionOptions browsingContextsOptions)
246253
{
247-
await _bidi.SessionModule.SubscribeAsync([eventName], new() { Contexts = browsingContextsOptions.Contexts }).ConfigureAwait(false);
254+
var subscribeResult = await _bidi.SessionModule.SubscribeAsync([eventName], new() { Contexts = browsingContextsOptions.Contexts }).ConfigureAwait(false);
248255

249256
var eventHandler = new AsyncEventHandler<TEventArgs>(eventName, func, browsingContextsOptions.Contexts);
250257

251258
handlers.Add(eventHandler);
252259

253-
return new Subscription(this, eventHandler);
260+
return new Subscription(subscribeResult.Subscription, this, eventHandler);
254261
}
255262
else
256263
{
257-
await _bidi.SessionModule.SubscribeAsync([eventName]).ConfigureAwait(false);
264+
var subscribeResult = await _bidi.SessionModule.SubscribeAsync([eventName]).ConfigureAwait(false);
258265

259266
var eventHandler = new AsyncEventHandler<TEventArgs>(eventName, func);
260267

261268
handlers.Add(eventHandler);
262269

263-
return new Subscription(this, eventHandler);
270+
return new Subscription(subscribeResult.Subscription, this, eventHandler);
264271
}
265272
}
266273

267-
public async Task UnsubscribeAsync(EventHandler eventHandler)
274+
public async Task UnsubscribeAsync(Modules.Session.Subscription subscription, EventHandler eventHandler)
268275
{
269276
var eventHandlers = _eventHandlers[eventHandler.EventName];
270277

271278
eventHandlers.Remove(eventHandler);
272279

273-
if (eventHandler.Contexts is not null)
280+
if (subscription is not null)
274281
{
275-
if (!eventHandlers.Any(h => eventHandler.Contexts.Equals(h.Contexts)) && !eventHandlers.Any(h => h.Contexts is null))
276-
{
277-
await _bidi.SessionModule.UnsubscribeAsync([eventHandler.EventName], new() { Contexts = eventHandler.Contexts }).ConfigureAwait(false);
278-
}
282+
await _bidi.SessionModule.UnsubscribeAsync([subscription]).ConfigureAwait(false);
279283
}
280284
else
281285
{
282-
if (!eventHandlers.Any(h => h.Contexts is not null) && !eventHandlers.Any(h => h.Contexts is null))
286+
if (eventHandler.Contexts is not null)
287+
{
288+
if (!eventHandlers.Any(h => eventHandler.Contexts.Equals(h.Contexts)) && !eventHandlers.Any(h => h.Contexts is null))
289+
{
290+
await _bidi.SessionModule.UnsubscribeAsync([eventHandler.EventName], new() { Contexts = eventHandler.Contexts }).ConfigureAwait(false);
291+
}
292+
}
293+
else
283294
{
284-
await _bidi.SessionModule.UnsubscribeAsync([eventHandler.EventName]).ConfigureAwait(false);
295+
if (!eventHandlers.Any(h => h.Contexts is not null) && !eventHandlers.Any(h => h.Contexts is null))
296+
{
297+
await _bidi.SessionModule.UnsubscribeAsync([eventHandler.EventName]).ConfigureAwait(false);
298+
}
285299
}
286300
}
287301
}

0 commit comments

Comments
 (0)