Skip to content

Commit 1348b30

Browse files
authored
Merge branch 'trunk' into environment-variable-driver-location
2 parents 67017cf + 019f7c5 commit 1348b30

File tree

14 files changed

+202
-126
lines changed

14 files changed

+202
-126
lines changed

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/137.0/linux-x86_64/en-US/firefox-137.0.tar.xz",
15-
sha256 = "4d2d0a64a11f8aab7a1be583e1e4cddfaf2671967212b369a87489f3c11c3ac9",
14+
url = "https://ftp.mozilla.org/pub/firefox/releases/137.0.2/linux-x86_64/en-US/firefox-137.0.2.tar.xz",
15+
sha256 = "3d6f07eddbd98ae96b55cd6ec95fcf18b61a139a0c68739c098954b5015c4b11",
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/137.0/mac/en-US/Firefox%20137.0.dmg",
37-
sha256 = "bd9bff96ae3701f9c4957675ff3990fcb8306cbb2f6554fb81ad2427b1ec8464",
36+
url = "https://ftp.mozilla.org/pub/firefox/releases/137.0.2/mac/en-US/Firefox%20137.0.2.dmg",
37+
sha256 = "0338912d47bdcb9ea2c09bcf31b7e68a4ded1a083b60c129781534d535601ed5",
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/138.0b3/linux-x86_64/en-US/firefox-138.0b3.tar.xz",
54-
sha256 = "7f57c9de156ed8dbd509c99d55b6c303dcd097cd5cca4a02264f59a12b72723b",
53+
url = "https://ftp.mozilla.org/pub/firefox/releases/138.0b9/linux-x86_64/en-US/firefox-138.0b9.tar.xz",
54+
sha256 = "ca4f673d6abd3b2b4adc971097057664ad1a097ffd67b99257e08ea50ad5fed5",
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/138.0b3/mac/en-US/Firefox%20138.0b3.dmg",
76-
sha256 = "1ee265b475aa1b9a04d560aac7b5fdfb12eb00f3265db9b05e98df4c894aad1f",
75+
url = "https://ftp.mozilla.org/pub/firefox/releases/138.0b9/mac/en-US/Firefox%20138.0b9.dmg",
76+
sha256 = "4e1749becc9427c908865af93cf245fc82895236eb8ad160798342a9d6714dde",
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/d3d754a3-4afc-4dc2-b1b9-5226894fdf12/MicrosoftEdge-135.0.3179.54.pkg",
127-
sha256 = "7bb07e3722866a4b5e44f0efe42c204a72105cbcfd3abe96811d6f00d08e8a61",
126+
url = "https://msedge.sf.dl.delivery.mp.microsoft.com/filestreamingservice/files/b405fb02-0c71-4762-be7f-08a88b17c176/MicrosoftEdge-135.0.3179.85.pkg",
127+
sha256 = "292b4794bc9452908d67971e04f5184c167316b2e0fcead3f5739c3738a358b6",
128128
move = {
129-
"MicrosoftEdge-135.0.3179.54.pkg/Payload/Microsoft Edge.app": "Edge.app",
129+
"MicrosoftEdge-135.0.3179.85.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_135.0.3179.54-1_amd64.deb",
147-
sha256 = "029a54217385a2e191c4c33a8a866ad1c8252a4361f35d67fb7eb3e72bd502e7",
146+
url = "https://packages.microsoft.com/repos/edge/pool/main/m/microsoft-edge-stable/microsoft-edge-stable_135.0.3179.85-1_amd64.deb",
147+
sha256 = "c756292acbe3d89c75fd5135dde13f68292ff9beeb18e428e3171162ed864060",
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/135.0.3179.54/edgedriver_linux64.zip",
169-
sha256 = "37476b885cb014585c9848482c84115dea1f9f46b4790cec47f2a0e07863cba2",
168+
url = "https://msedgedriver.azureedge.net/135.0.3179.85/edgedriver_linux64.zip",
169+
sha256 = "d05ef36fc3c6fdc4bc0b0c96a9fffc0ce0afd2289f08dfe2cd141d41e8dea195",
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/135.0.3179.54/edgedriver_mac64.zip",
186-
sha256 = "a7c06338f273a03a3451a5c1a3d73bb761f5506964b0ac77ef1449ede0f44e50",
185+
url = "https://msedgedriver.azureedge.net/135.0.3179.85/edgedriver_mac64.zip",
186+
sha256 = "9f9c59099b664c9c4a8f59d501e9fcf0dec3e4bfd860635669730a6e59d55ca9",
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/135.0.7049.42/linux64/chrome-linux64.zip",
203-
sha256 = "47349b3a8191a2db0572ff815a99117af7d226cf79ced863192143f263758249",
202+
url = "https://storage.googleapis.com/chrome-for-testing-public/135.0.7049.95/linux64/chrome-linux64.zip",
203+
sha256 = "bf406b6de491825f7db9d4b635b9ba56a8e8b6e60fac130382f561bb62f12d7e",
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/135.0.7049.42/mac-x64/chrome-mac-x64.zip",
225-
sha256 = "b1e0350c25bd05e6bfb2f63e72f601700b9f56d6fd7d32737e9e74d53566bb13",
224+
url = "https://storage.googleapis.com/chrome-for-testing-public/135.0.7049.95/mac-x64/chrome-mac-x64.zip",
225+
sha256 = "949f46e9fd58b96a3c5fc436dde9b4aa04e683258a83867d6f0ec8abb58537ec",
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/135.0.7049.42/linux64/chromedriver-linux64.zip",
247-
sha256 = "f684e5e39adcba8b0d968c0131d0348f5edf1365bfb176ef7857e32c7d3ebdbf",
246+
url = "https://storage.googleapis.com/chrome-for-testing-public/135.0.7049.95/linux64/chromedriver-linux64.zip",
247+
sha256 = "64e1f8bf5bbb94983dff82874b79f45039e5463323e8912d38b83a1277f9e272",
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/135.0.7049.42/mac-x64/chromedriver-mac-x64.zip",
265-
sha256 = "dadf62fb94b9407db5e93ee7710ad4afb6b987f061d1b41847c478c78f744e2f",
264+
url = "https://storage.googleapis.com/chrome-for-testing-public/135.0.7049.95/mac-x64/chromedriver-mac-x64.zip",
265+
sha256 = "9bf330af1a080d6bbda6dc80cf064de371941e65b826cfc5a589628d1c78aef9",
266266
strip_prefix = "chromedriver-mac-x64",
267267
build_file_content = """
268268
load("@aspect_rules_js//js:defs.bzl", "js_library")

java/src/org/openqa/selenium/bidi/module/BrowsingContextInspector.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,18 +140,22 @@ public void onBrowsingContextLoaded(Consumer<NavigationInfo> consumer) {
140140
addNavigationEventListener("browsingContext.load", consumer);
141141
}
142142

143-
private void onDownloadWillBegin(Consumer<NavigationInfo> consumer) {
143+
public void onDownloadWillBegin(Consumer<NavigationInfo> consumer) {
144144
addNavigationEventListener("browsingContext.downloadWillBegin", consumer);
145145
}
146146

147-
private void onNavigationAborted(Consumer<NavigationInfo> consumer) {
147+
public void onNavigationAborted(Consumer<NavigationInfo> consumer) {
148148
addNavigationEventListener("browsingContext.navigationAborted", consumer);
149149
}
150150

151-
private void onNavigationFailed(Consumer<NavigationInfo> consumer) {
151+
public void onNavigationFailed(Consumer<NavigationInfo> consumer) {
152152
addNavigationEventListener("browsingContext.navigationFailed", consumer);
153153
}
154154

155+
public void onNavigationCommitted(Consumer<NavigationInfo> consumer) {
156+
addNavigationEventListener("browsingContext.navigationCommitted", consumer);
157+
}
158+
155159
public void onUserPromptClosed(Consumer<UserPromptClosed> consumer) {
156160
if (browsingContextIds.isEmpty()) {
157161
this.bidi.addListener(userPromptClosed, consumer);

java/src/org/openqa/selenium/firefox/FirefoxOptions.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,9 @@ public class FirefoxOptions extends AbstractDriverOptions<FirefoxOptions> {
6262
public FirefoxOptions() {
6363
setCapability(CapabilityType.BROWSER_NAME, FIREFOX.browserName());
6464
setAcceptInsecureCerts(true);
65-
// Firefox 129 onwards the CDP protocol will not be enabled by default. Setting this preference
66-
// will enable it.
6765
// https://fxdx.dev/deprecating-cdp-support-in-firefox-embracing-the-future-with-webdriver-bidi/.
68-
addPreference("remote.active-protocols", 3);
66+
// Enable BiDi only
67+
addPreference("remote.active-protocols", 1);
6968
}
7069

7170
public FirefoxOptions(Capabilities source) {

java/test/org/openqa/selenium/bidi/browsingcontext/BrowsingContextInspectorTest.java

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
package org.openqa.selenium.bidi.browsingcontext;
1919

2020
import static org.assertj.core.api.AssertionsForClassTypes.assertThat;
21+
import static org.openqa.selenium.testing.drivers.Browser.*;
2122

2223
import java.util.List;
2324
import java.util.concurrent.CompletableFuture;
@@ -30,6 +31,7 @@
3031
import org.openqa.selenium.bidi.module.BrowsingContextInspector;
3132
import org.openqa.selenium.testing.JupiterTestBase;
3233
import org.openqa.selenium.testing.NeedsFreshDriver;
34+
import org.openqa.selenium.testing.NotYetImplemented;
3335

3436
class BrowsingContextInspectorTest extends JupiterTestBase {
3537

@@ -213,4 +215,22 @@ void canListenToUserPromptClosedEvent()
213215
assertThat(userPromptClosed.getAccepted()).isTrue();
214216
}
215217
}
218+
219+
@Test
220+
@NeedsFreshDriver
221+
@NotYetImplemented(FIREFOX)
222+
void canListenToNavigationCommittedEvent()
223+
throws ExecutionException, InterruptedException, TimeoutException {
224+
try (BrowsingContextInspector inspector = new BrowsingContextInspector(driver)) {
225+
CompletableFuture<NavigationInfo> future = new CompletableFuture<>();
226+
227+
BrowsingContext context = new BrowsingContext(driver, driver.getWindowHandle());
228+
inspector.onNavigationCommitted(future::complete);
229+
context.navigate(appServer.whereIs("/bidi/logEntryAdded.html"), ReadinessState.COMPLETE);
230+
231+
NavigationInfo navigationInfo = future.get(5, TimeUnit.SECONDS);
232+
assertThat(navigationInfo.getBrowsingContextId()).isEqualTo(context.getId());
233+
assertThat(navigationInfo.getUrl()).contains("/bidi/logEntryAdded.html");
234+
}
235+
}
216236
}

java/test/org/openqa/selenium/bidi/input/DefaultWheelTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,8 @@ void shouldScrollFromViewportByGivenAmount() {
146146
.pause(3000)
147147
.getSequences());
148148

149+
wait.until(driver -> driver.findElement(By.name("nested_scrolling_frame")).isDisplayed());
150+
149151
assertTrue(inViewport(footer));
150152
}
151153

java/test/org/openqa/selenium/bidi/network/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ java_selenium_test_suite(
77
srcs = glob(["*Test.java"]),
88
browsers = [
99
"firefox",
10+
"chrome",
1011
],
1112
tags = [
1213
"selenium-remote",

0 commit comments

Comments
 (0)