Skip to content

Commit 5f7c20c

Browse files
authored
Merge branch 'trunk' into template_fun
2 parents 8ee24a3 + 98b1553 commit 5f7c20c

File tree

9 files changed

+407
-390
lines changed

9 files changed

+407
-390
lines changed

.github/label-commenter-config.yml

+12
Original file line numberDiff line numberDiff line change
@@ -150,4 +150,16 @@ labels:
150150
151151
We actively encourage people to create their own wrapper and helper code that makes sense for them.
152152
If you have any questions, please [contact us](https://www.selenium.dev/support)
153+
pr:
154+
body: |
155+
Thank you, @{{ pull_request.user.login }} for this code suggestion.
156+
157+
The support packages contain example code that many users find helpful, but they do not necessarily represent
158+
the best practices for using Selenium, and the Selenium team is not currently merging changes to them.
159+
160+
We actively encourage people to add the wrapper and helper code that makes sense for them to their own frameworks.
161+
If you have any questions, please [contact us](https://www.selenium.dev/support)
162+
action: close
163+
164+
153165

.github/workflows/label-commenter.yml

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ name: Label Commenter
44
on:
55
issues:
66
types: [ labeled ]
7+
pull_request_target:
8+
types: [labeled]
79

810
permissions:
911
contents: read

Rakefile

-4
Original file line numberDiff line numberDiff line change
@@ -544,10 +544,6 @@ namespace :node do
544544
File.open(file, 'w') { |f| f.puts text }
545545
@git.add(file)
546546
end
547-
548-
# Update package-lock.json
549-
sh 'pnpm install --dir javascript/selenium-webdriver', verbose: true
550-
@git.add('javascript/selenium-webdriver/package-lock.json')
551547
end
552548
end
553549

common/repositories.bzl

+16-16
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/136.0.4/linux-x86_64/en-US/firefox-136.0.4.tar.xz",
15-
sha256 = "ffebf056b2d6cb477ed5768b899d84b6ba553787ca9465cd5783f5e3ebbe75d7",
14+
url = "https://ftp.mozilla.org/pub/firefox/releases/137.0/linux-x86_64/en-US/firefox-137.0.tar.xz",
15+
sha256 = "4d2d0a64a11f8aab7a1be583e1e4cddfaf2671967212b369a87489f3c11c3ac9",
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/136.0.4/mac/en-US/Firefox%20136.0.4.dmg",
37-
sha256 = "c1cb0a0b2ec2c733e77529a5f87a7ed834551712c1b91aa2ab06f9f921eb154f",
36+
url = "https://ftp.mozilla.org/pub/firefox/releases/137.0/mac/en-US/Firefox%20137.0.dmg",
37+
sha256 = "bd9bff96ae3701f9c4957675ff3990fcb8306cbb2f6554fb81ad2427b1ec8464",
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/137.0b10/linux-x86_64/en-US/firefox-137.0b10.tar.xz",
54-
sha256 = "319af71913886726333110cc2f365b39cdaa120d90938869985f8967e8f4f4af",
53+
url = "https://ftp.mozilla.org/pub/firefox/releases/138.0b1/linux-x86_64/en-US/firefox-138.0b1.tar.xz",
54+
sha256 = "1a502b1deb0df5a9c80b3f3e9807c599d2416aaa5bf2628d4cfa1b01448e378a",
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/137.0b10/mac/en-US/Firefox%20137.0b10.dmg",
76-
sha256 = "93de7f00a296d0027295020bb8c6378fa1a95015bc78ec0bb3ffd60d264ccb0e",
75+
url = "https://ftp.mozilla.org/pub/firefox/releases/138.0b1/mac/en-US/Firefox%20138.0b1.dmg",
76+
sha256 = "ed7eb980a71333c1f3936510d85a45ca7d04289a05ba1e845e0335738a6489ae",
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/134.0.6998.165/linux64/chrome-linux64.zip",
203-
sha256 = "1d93094e9781d1b1deb634b4cbf21369e5fb91a374689037e7aa712445045b9d",
202+
url = "https://storage.googleapis.com/chrome-for-testing-public/135.0.7049.42/linux64/chrome-linux64.zip",
203+
sha256 = "47349b3a8191a2db0572ff815a99117af7d226cf79ced863192143f263758249",
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/134.0.6998.165/mac-x64/chrome-mac-x64.zip",
225-
sha256 = "cf1a1bba1d82b790aac96b32a8647c00ba8281d194cb6c0c556beb5472e350bd",
224+
url = "https://storage.googleapis.com/chrome-for-testing-public/135.0.7049.42/mac-x64/chrome-mac-x64.zip",
225+
sha256 = "b1e0350c25bd05e6bfb2f63e72f601700b9f56d6fd7d32737e9e74d53566bb13",
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/134.0.6998.165/linux64/chromedriver-linux64.zip",
247-
sha256 = "f45902a1b61ae4e5741c468286677213c6376fd6543b0809b94a84e6f7fc17f8",
246+
url = "https://storage.googleapis.com/chrome-for-testing-public/135.0.7049.42/linux64/chromedriver-linux64.zip",
247+
sha256 = "f684e5e39adcba8b0d968c0131d0348f5edf1365bfb176ef7857e32c7d3ebdbf",
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/134.0.6998.165/mac-x64/chromedriver-mac-x64.zip",
265-
sha256 = "4e5ff9ecbe1586e4820784e532b25c33eec0304f7699919d59d2888a4f49b95c",
264+
url = "https://storage.googleapis.com/chrome-for-testing-public/135.0.7049.42/mac-x64/chromedriver-mac-x64.zip",
265+
sha256 = "dadf62fb94b9407db5e93ee7710ad4afb6b987f061d1b41847c478c78f744e2f",
266266
strip_prefix = "chromedriver-mac-x64",
267267
build_file_content = """
268268
load("@aspect_rules_js//js:defs.bzl", "js_library")

common/src/web/bidi/logEntryAdded.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<body>
44

5-
<h1>Long entry added events</h1>
5+
<h1>Log entry added events</h1>
66

77
<button id="consoleLog" onclick="helloWorld()">Click me for console logs</button>
88

common/src/web/logEntryAdded.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<body>
44

5-
<h1>Long entry added events</h1>
5+
<h1>Log entry added events</h1>
66

77
<button id="consoleLog" onclick="helloWorld()">Click me for console logs</button>
88

dotnet/src/support/UI/PopupWindowFinder.cs

+3-26
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
// </copyright>
1919

2020
using System;
21-
using System.Collections.Generic;
2221
using System.Collections.ObjectModel;
2322
using System.Linq;
2423

@@ -132,35 +131,13 @@ public string Invoke(Action popupMethod)
132131
ReadOnlyCollection<string> existingHandles = this.driver.WindowHandles;
133132
popupMethod();
134133
WebDriverWait wait = new WebDriverWait(SystemClock.Instance, this.driver, this.timeout, this.sleepInterval);
135-
string popupHandle = wait.Until<string>((d) =>
134+
string popupHandle = wait.Until(driver =>
136135
{
137-
string? foundHandle = null;
138-
List<string> differentHandles = GetDifference(existingHandles, this.driver.WindowHandles);
139-
if (differentHandles.Count > 0)
140-
{
141-
foundHandle = differentHandles[0];
142-
}
143-
144-
return foundHandle;
136+
ReadOnlyCollection<string> newHandles = driver.WindowHandles;
137+
return newHandles.Except(existingHandles, StringComparer.Ordinal).FirstOrDefault();
145138
});
146139

147140
return popupHandle;
148141
}
149-
150-
private static List<string> GetDifference(ReadOnlyCollection<string> existingHandles, ReadOnlyCollection<string> currentHandles)
151-
{
152-
// We are using LINQ to get the difference between the two lists.
153-
// The non-LINQ version looks like the following:
154-
// List<string> differentHandles = new List<string>();
155-
// foreach (string handle in currentHandles)
156-
// {
157-
// if (!existingHandles.Contains(handle))
158-
// {
159-
// currentHandles.Add(handle);
160-
// }
161-
// }
162-
// return differentHandles;
163-
return currentHandles.Except(existingHandles).ToList();
164-
}
165142
}
166143
}

java/test/org/openqa/selenium/WebNetworkTest.java

+6-6
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ void canAddRequestHandler() {
189189

190190
driver.get(page);
191191

192-
assertThat(driver.findElement(By.tagName("h1")).getText()).isEqualTo("Long entry added events");
192+
assertThat(driver.findElement(By.tagName("h1")).getText()).isEqualTo("Log entry added events");
193193
}
194194

195195
@Test
@@ -321,7 +321,7 @@ void canAddMultipleRequestHandlers() {
321321

322322
driver.get(page);
323323

324-
assertThat(driver.findElement(By.tagName("h1")).getText()).isEqualTo("Long entry added events");
324+
assertThat(driver.findElement(By.tagName("h1")).getText()).isEqualTo("Log entry added events");
325325
}
326326

327327
@Test
@@ -341,7 +341,7 @@ void canAddMultipleRequestHandlersWithTheSameFilter() {
341341

342342
driver.get(page);
343343

344-
assertThat(driver.findElement(By.tagName("h1")).getText()).isEqualTo("Long entry added events");
344+
assertThat(driver.findElement(By.tagName("h1")).getText()).isEqualTo("Log entry added events");
345345
}
346346

347347
@Test
@@ -409,11 +409,11 @@ void canRemoveRequestHandler() throws InterruptedException {
409409
@Ignore(Browser.CHROME)
410410
@Ignore(Browser.EDGE)
411411
void canRemoveRequestHandlerThatDoesNotExist() {
412-
((RemoteWebDriver) driver).network().removeAuthenticationHandler(5);
412+
((RemoteWebDriver) driver).network().removeRequestHandler(5);
413413
page = appServer.whereIs("/bidi/logEntryAdded.html");
414414
driver.get(page);
415415

416-
assertThat(driver.findElement(By.tagName("h1")).getText()).isEqualTo("Long entry added events");
416+
assertThat(driver.findElement(By.tagName("h1")).getText()).isEqualTo("Log entry added events");
417417
}
418418

419419
@Test
@@ -439,6 +439,6 @@ void canClearRequestHandlers() {
439439

440440
driver.get(page);
441441

442-
assertThat(driver.findElement(By.tagName("h1")).getText()).isEqualTo("Long entry added events");
442+
assertThat(driver.findElement(By.tagName("h1")).getText()).isEqualTo("Log entry added events");
443443
}
444444
}

0 commit comments

Comments
 (0)