Skip to content

Commit 928ad44

Browse files
resolved merge conflicts
2 parents fd6d1b2 + 88479dc commit 928ad44

40 files changed

+1606
-270
lines changed

.github/label-commenter-config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ labels:
66
body: |
77
@{{ issue.user.login }}, thank you for creating this issue. We will troubleshoot it as soon as we can.
88
9-
Selenium Triage Team: remember to follow the [Triage Guide](https://github.com/SeleniumHQ/selenium/blob/trunk/README.md)
9+
Selenium Triage Team: remember to follow the [Triage Guide](https://github.com/SeleniumHQ/selenium/wiki/How-to-Triage-Issues)
1010
- name: G-w3c
1111
labeled:
1212
issue:

common/repositories.bzl

+8-8
Original file line numberDiff line numberDiff line change
@@ -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.95/linux64/chrome-linux64.zip",
203-
sha256 = "bf406b6de491825f7db9d4b635b9ba56a8e8b6e60fac130382f561bb62f12d7e",
202+
url = "https://storage.googleapis.com/chrome-for-testing-public/135.0.7049.97/linux64/chrome-linux64.zip",
203+
sha256 = "dca0a86931162c85fbd054cc037519fcf855dca912c7fd2dc2e2e48fb7d59961",
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.95/mac-x64/chrome-mac-x64.zip",
225-
sha256 = "949f46e9fd58b96a3c5fc436dde9b4aa04e683258a83867d6f0ec8abb58537ec",
224+
url = "https://storage.googleapis.com/chrome-for-testing-public/135.0.7049.97/mac-x64/chrome-mac-x64.zip",
225+
sha256 = "53880ac98a04490c647d1a5649eb0ebd8001741bb17501df34908e8826fe516f",
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.95/linux64/chromedriver-linux64.zip",
247-
sha256 = "64e1f8bf5bbb94983dff82874b79f45039e5463323e8912d38b83a1277f9e272",
246+
url = "https://storage.googleapis.com/chrome-for-testing-public/135.0.7049.97/linux64/chromedriver-linux64.zip",
247+
sha256 = "12a0e6e8035b3671a7a884e33949f1f5154d2d2ca68593715851f6f3a5e836ec",
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.95/mac-x64/chromedriver-mac-x64.zip",
265-
sha256 = "9bf330af1a080d6bbda6dc80cf064de371941e65b826cfc5a589628d1c78aef9",
264+
url = "https://storage.googleapis.com/chrome-for-testing-public/135.0.7049.97/mac-x64/chromedriver-mac-x64.zip",
265+
sha256 = "2eedf6406ca4e9f11a4c196ce56e8d25c15dc68bd8ea07c7da8423d2327e9aa1",
266266
strip_prefix = "chromedriver-mac-x64",
267267
build_file_content = """
268268
load("@aspect_rules_js//js:defs.bzl", "js_library")

dotnet/src/webdriver/Firefox/FirefoxOptions.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ public FirefoxOptions()
8383
this.AddKnownCapabilityName(FirefoxOptions.FirefoxLegacyProfileCapability, "Profile property");
8484
this.AddKnownCapabilityName(FirefoxOptions.FirefoxLegacyBinaryCapability, "BrowserExecutableLocation property");
8585
this.AddKnownCapabilityName(FirefoxOptions.FirefoxEnableDevToolsProtocolCapability, "EnableDevToolsProtocol property");
86-
// Firefox 129 onwards the CDP protocol will not be enabled by default. Setting this preference will enable it.
8786
// https://fxdx.dev/deprecating-cdp-support-in-firefox-embracing-the-future-with-webdriver-bidi/.
88-
this.SetPreference("remote.active-protocols", 3);
87+
// Enable BiDi only
88+
this.SetPreference("remote.active-protocols", 1);
8989
}
9090

9191
/// <summary>

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

+2-3
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/src/org/openqa/selenium/remote/http/jdk/JdkHttpClient.java

+5-2
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,13 @@ public WebSocket openSocket(HttpRequest request, WebSocket.Listener listener) {
166166
throw new ConnectionFailedException("JdkWebSocket initial request execution error", e);
167167
}
168168

169+
java.net.http.WebSocket.Builder builder = client.newWebSocketBuilder();
170+
171+
request.getHeaderNames().forEach(name -> builder.header(name, request.getHeader(name)));
172+
169173
CompletableFuture<Integer> closed = new CompletableFuture<>();
170174
CompletableFuture<java.net.http.WebSocket> webSocketCompletableFuture =
171-
client
172-
.newWebSocketBuilder()
175+
builder
173176
.connectTimeout(connectTimeout)
174177
.buildAsync(
175178
uri,

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

+2
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/AddInterceptParametersTest.java

-8
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,17 @@
1818
package org.openqa.selenium.bidi.network;
1919

2020
import static org.assertj.core.api.AssertionsForClassTypes.assertThat;
21-
import static org.openqa.selenium.testing.drivers.Browser.EDGE;
2221

2322
import java.util.List;
2423
import org.junit.jupiter.api.Test;
2524
import org.openqa.selenium.bidi.module.Network;
2625
import org.openqa.selenium.testing.JupiterTestBase;
2726
import org.openqa.selenium.testing.NeedsFreshDriver;
28-
import org.openqa.selenium.testing.NotYetImplemented;
2927

3028
class AddInterceptParametersTest extends JupiterTestBase {
3129

3230
@Test
3331
@NeedsFreshDriver
34-
@NotYetImplemented(EDGE)
3532
void canAddInterceptPhase() {
3633
try (Network network = new Network(driver)) {
3734
String intercept =
@@ -42,7 +39,6 @@ void canAddInterceptPhase() {
4239

4340
@Test
4441
@NeedsFreshDriver
45-
@NotYetImplemented(EDGE)
4642
void canAddInterceptPhases() {
4743
try (Network network = new Network(driver)) {
4844
String intercept =
@@ -55,7 +51,6 @@ void canAddInterceptPhases() {
5551

5652
@Test
5753
@NeedsFreshDriver
58-
@NotYetImplemented(EDGE)
5954
void canAddStringUrlPattern() {
6055
try (Network network = new Network(driver)) {
6156
String intercept =
@@ -68,7 +63,6 @@ void canAddStringUrlPattern() {
6863

6964
@Test
7065
@NeedsFreshDriver
71-
@NotYetImplemented(EDGE)
7266
void canAddStringUrlPatterns() {
7367
try (Network network = new Network(driver)) {
7468
String intercept =
@@ -84,7 +78,6 @@ void canAddStringUrlPatterns() {
8478

8579
@Test
8680
@NeedsFreshDriver
87-
@NotYetImplemented(EDGE)
8881
void canAddUrlPattern() {
8982
try (Network network = new Network(driver)) {
9083
UrlPattern pattern =
@@ -104,7 +97,6 @@ void canAddUrlPattern() {
10497

10598
@Test
10699
@NeedsFreshDriver
107-
@NotYetImplemented(EDGE)
108100
void canAddUrlPatterns() {
109101
try (Network network = new Network(driver)) {
110102
UrlPattern pattern1 =

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

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ java_selenium_test_suite(
88
browsers = [
99
"firefox",
1010
"chrome",
11+
"edge",
1112
],
1213
tags = [
1314
"selenium-remote",

java/test/org/openqa/selenium/bidi/network/NetworkCommandsTest.java

-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ void canAddIntercept() {
5757

5858
@Test
5959
@NeedsFreshDriver
60-
@NotYetImplemented(EDGE)
6160
void canContinueRequest() throws InterruptedException {
6261
try (Network network = new Network(driver)) {
6362
String intercept =

java/test/org/openqa/selenium/bidi/network/NetworkEventsTest.java

-4
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ class NetworkEventsTest extends JupiterTestBase {
3939

4040
@Test
4141
@NeedsFreshDriver
42-
@NotYetImplemented(EDGE)
4342
void canListenToBeforeRequestSentEvent()
4443
throws ExecutionException, InterruptedException, TimeoutException {
4544
try (Network network = new Network(driver)) {
@@ -60,7 +59,6 @@ void canListenToBeforeRequestSentEvent()
6059

6160
@Test
6261
@NeedsFreshDriver
63-
@NotYetImplemented(EDGE)
6462
void canListenToResponseStartedEvent()
6563
throws ExecutionException, InterruptedException, TimeoutException {
6664
try (Network network = new Network(driver)) {
@@ -83,7 +81,6 @@ void canListenToResponseStartedEvent()
8381

8482
@Test
8583
@NeedsFreshDriver
86-
@NotYetImplemented(EDGE)
8784
void canListenToResponseCompletedEvent()
8885
throws ExecutionException, InterruptedException, TimeoutException {
8986
try (Network network = new Network(driver)) {
@@ -106,7 +103,6 @@ void canListenToResponseCompletedEvent()
106103

107104
@Test
108105
@NeedsFreshDriver
109-
@NotYetImplemented(EDGE)
110106
void canListenToResponseCompletedEventWithCookie()
111107
throws ExecutionException, InterruptedException, TimeoutException {
112108
try (Network network = new Network(driver)) {

javascript/selenium-webdriver/firefox.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -247,9 +247,9 @@ class Options extends Capabilities {
247247
constructor(other) {
248248
super(other)
249249
this.setBrowserName(Browser.FIREFOX)
250-
// Firefox 129 onwards the CDP protocol will not be enabled by default. Setting this preference will enable it.
251250
// https://fxdx.dev/deprecating-cdp-support-in-firefox-embracing-the-future-with-webdriver-bidi/.
252-
this.setPreference('remote.active-protocols', 3)
251+
// Enable BiDi only
252+
this.setPreference('remote.active-protocols', 1)
253253
}
254254

255255
/**

javascript/selenium-webdriver/test/firefox/options_test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ suite(
9090
assert.deepStrictEqual(
9191
{
9292
androidPackage: 'org.mozilla.firefox',
93-
prefs: { 'remote.active-protocols': 3 },
93+
prefs: { 'remote.active-protocols': 1 },
9494
},
9595
firefoxOptions,
9696
)

py/BUILD.bazel

+1-2
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,6 @@ py_library(
321321
"test/selenium/webdriver/__init__.py",
322322
"test/selenium/webdriver/chrome/__init__.py",
323323
"test/selenium/webdriver/common/__init__.py",
324-
"test/selenium/webdriver/common/conftest.py",
325324
"test/selenium/webdriver/common/network.py",
326325
"test/selenium/webdriver/common/webserver.py",
327326
"test/selenium/webdriver/firefox/__init__.py",
@@ -330,7 +329,6 @@ py_library(
330329
"test/selenium/webdriver/marionette/conftest.py",
331330
"test/selenium/webdriver/safari/conftest.py",
332331
"test/selenium/webdriver/support/__init__.py",
333-
"test/selenium/webdriver/support/conftest.py",
334332
],
335333
data = [
336334
"pyproject.toml",
@@ -547,6 +545,7 @@ py_test_suite(
547545
srcs = glob(
548546
[
549547
"test/selenium/webdriver/common/**/*.py",
548+
"test/selenium/webdriver/remote/**/*.py",
550549
"test/selenium/webdriver/support/**/*.py",
551550
],
552551
exclude = BIDI_TESTS,

py/conftest.py

+13
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,11 @@ def pytest_ignore_collect(path, config):
9797
return len([d for d in _drivers if d.lower() in parts]) > 0
9898

9999

100+
def pytest_generate_tests(metafunc):
101+
if "driver" in metafunc.fixturenames and metafunc.config.option.drivers:
102+
metafunc.parametrize("driver", metafunc.config.option.drivers, indirect=True)
103+
104+
100105
def get_driver_class(driver_option):
101106
"""Generate the driver class name from the lowercase driver option."""
102107
if driver_option == "webkitgtk":
@@ -483,3 +488,11 @@ def clean_driver(request):
483488

484489
if request.node.get_closest_marker("no_driver_after_test"):
485490
driver_reference = None
491+
492+
493+
@pytest.fixture
494+
def firefox_options(request):
495+
options = webdriver.FirefoxOptions()
496+
if request.config.option.headless:
497+
options.add_argument("-headless")
498+
return options

0 commit comments

Comments
 (0)