Skip to content

Commit 1e98814

Browse files
authored
Merge branch 'trunk' into type-annotation-errors
2 parents 83233b3 + d808465 commit 1e98814

File tree

6 files changed

+30
-31
lines changed

6 files changed

+30
-31
lines changed

common/repositories.bzl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -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/017e25fc-2906-45b2-958c-1c71c4667dc1/MicrosoftEdge-139.0.3405.111.pkg",
127-
sha256 = "1aa42cbaaf38b035e17d43fbbe0a293ceb286c5fd298d463b1a369ed900a03ac",
126+
url = "https://msedge.sf.dl.delivery.mp.microsoft.com/filestreamingservice/files/95344cbf-d116-4494-8485-b96014e98901/MicrosoftEdge-139.0.3405.119.pkg",
127+
sha256 = "31b3ddce353180a706179d64086ed01b53cfd20a7daea45597a7e9e405fc553f",
128128
move = {
129-
"MicrosoftEdge-139.0.3405.111.pkg/Payload/Microsoft Edge.app": "Edge.app",
129+
"MicrosoftEdge-139.0.3405.119.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_139.0.3405.111-1_amd64.deb",
147-
sha256 = "d61b2fcef695083496184a6a323b2bcfb57d45af8fb6867ffe54974a5992dc52",
146+
url = "https://packages.microsoft.com/repos/edge/pool/main/m/microsoft-edge-stable/microsoft-edge-stable_139.0.3405.119-1_amd64.deb",
147+
sha256 = "e51e4e36cde5e7be2031fd9145ac9bf26444f734a88ff43858e05c7782e60c7b",
148148
build_file_content = """
149149
load("@aspect_rules_js//js:defs.bzl", "js_library")
150150
package(default_visibility = ["//visibility:public"])

java/src/org/openqa/selenium/grid/node/Node.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,9 +199,7 @@ protected Node(
199199
.to(() -> new Drain(this, json))
200200
.with(spanDecorator("node.drain").andThen(requiresSecret)),
201201
get("/se/grid/node/status")
202-
.to(
203-
() ->
204-
req -> new HttpResponse().setContent(asJson(Map.of("value", getStatus()))))
202+
.to(() -> req -> new HttpResponse().setContent(asJson(getStatus())))
205203
.with(spanDecorator("node.node_status")),
206204
get("/status").to(() -> new StatusHandler(this)).with(spanDecorator("node.status")));
207205
}

java/src/org/openqa/selenium/grid/router/HandleSession.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import static org.openqa.selenium.remote.RemoteTags.SESSION_ID;
2222
import static org.openqa.selenium.remote.RemoteTags.SESSION_ID_EVENT;
2323
import static org.openqa.selenium.remote.http.Contents.asJson;
24+
import static org.openqa.selenium.remote.http.Contents.string;
2425
import static org.openqa.selenium.remote.http.HttpMethod.GET;
2526
import static org.openqa.selenium.remote.tracing.Tags.EXCEPTION;
2627
import static org.openqa.selenium.remote.tracing.Tags.HTTP_REQUEST;
@@ -48,8 +49,8 @@
4849
import org.openqa.selenium.grid.data.NodeStatus;
4950
import org.openqa.selenium.grid.sessionmap.SessionMap;
5051
import org.openqa.selenium.grid.web.ReverseProxyHandler;
51-
import org.openqa.selenium.grid.web.Values;
5252
import org.openqa.selenium.internal.Require;
53+
import org.openqa.selenium.json.Json;
5354
import org.openqa.selenium.remote.ErrorCodec;
5455
import org.openqa.selenium.remote.SessionId;
5556
import org.openqa.selenium.remote.http.ClientConfig;
@@ -256,10 +257,13 @@ private ClientConfig fetchNodeSessionTimeout(URI uri) {
256257
try (HttpClient httpClient = httpClientFactory.createClient(config)) {
257258
HttpRequest statusRequest = new HttpRequest(GET, "/se/grid/node/status");
258259
HttpResponse res = httpClient.execute(statusRequest);
259-
NodeStatus nodeStatus = Values.get(res, NodeStatus.class);
260+
Json json = new Json();
261+
NodeStatus nodeStatus = json.toType(string(res), NodeStatus.class);
260262
if (nodeStatus != null) {
261263
sessionTimeout = nodeStatus.getSessionTimeout();
262264
}
265+
} catch (Exception e) {
266+
LOG.fine("Unable to fetch status for " + uri);
263267
}
264268
LOG.fine("Set read timeout: " + sessionTimeout.toSeconds() + " seconds for " + uri);
265269
config = config.readTimeout(sessionTimeout);

multitool.lock.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,41 +4,41 @@
44
"binaries": [
55
{
66
"kind": "archive",
7-
"url": "https://github.com/astral-sh/ruff/releases/download/0.12.3/ruff-aarch64-unknown-linux-musl.tar.gz",
7+
"url": "https://github.com/astral-sh/ruff/releases/download/0.12.10/ruff-aarch64-unknown-linux-musl.tar.gz",
88
"file": "ruff-aarch64-unknown-linux-musl/ruff",
9-
"sha256": "7890e49b12c1321688540324a7788457a22711657301598402cba1a9e9be6607",
9+
"sha256": "10b43a88fb948aaae538ec9f35e93b4433f144d0379fb3a67d88282595b969f7",
1010
"os": "linux",
1111
"cpu": "arm64"
1212
},
1313
{
1414
"kind": "archive",
15-
"url": "https://github.com/astral-sh/ruff/releases/download/0.12.3/ruff-x86_64-unknown-linux-musl.tar.gz",
15+
"url": "https://github.com/astral-sh/ruff/releases/download/0.12.10/ruff-x86_64-unknown-linux-musl.tar.gz",
1616
"file": "ruff-x86_64-unknown-linux-musl/ruff",
17-
"sha256": "6ee9216ba4f7fd761e68bd5c23958e662c67fcff8f49e511660d557431b4bd7c",
17+
"sha256": "dd4e5b8f81547a48975489913a80e0dce6be7f1c455912fe3a5bd5a1f5f1a35d",
1818
"os": "linux",
1919
"cpu": "x86_64"
2020
},
2121
{
2222
"kind": "archive",
23-
"url": "https://github.com/astral-sh/ruff/releases/download/0.12.3/ruff-aarch64-apple-darwin.tar.gz",
23+
"url": "https://github.com/astral-sh/ruff/releases/download/0.12.10/ruff-aarch64-apple-darwin.tar.gz",
2424
"file": "ruff-aarch64-apple-darwin/ruff",
25-
"sha256": "5769e4841870d1f7c17f12a7d1437222e8035eded52f93c54c035c770dbffebb",
25+
"sha256": "72c6abf39f5e87c57faa2d191baf2582e437ff72cdc0f52b7c7e50f26d41b807",
2626
"os": "macos",
2727
"cpu": "arm64"
2828
},
2929
{
3030
"kind": "archive",
31-
"url": "https://github.com/astral-sh/ruff/releases/download/0.12.3/ruff-x86_64-apple-darwin.tar.gz",
31+
"url": "https://github.com/astral-sh/ruff/releases/download/0.12.10/ruff-x86_64-apple-darwin.tar.gz",
3232
"file": "ruff-x86_64-apple-darwin/ruff",
33-
"sha256": "472a4790db11a8bcd79cf7b731fb1c036c376f9cc4e6532099f8f39a6f86b9bb",
33+
"sha256": "8619f277921b3e2e56d850c3e203fd4ef10b457bc50f93ab6fe85743eb324de6",
3434
"os": "macos",
3535
"cpu": "x86_64"
3636
},
3737
{
3838
"kind": "archive",
39-
"url": "https://github.com/astral-sh/ruff/releases/download/0.12.3/ruff-x86_64-pc-windows-msvc.zip",
39+
"url": "https://github.com/astral-sh/ruff/releases/download/0.12.10/ruff-x86_64-pc-windows-msvc.zip",
4040
"file": "ruff-x86_64-pc-windows-msvc/ruff.exe",
41-
"sha256": "37dc6f2f5756421fc59fe5f841ecaa92beee38a39751dfe5a42bdc13992da3d5",
41+
"sha256": "a639e4dee10cb2900bffa7165457766671c59c744ce6b61cc658c35ab33a91fd",
4242
"os": "windows",
4343
"cpu": "x86_64"
4444
}

py/test/selenium/webdriver/common/bidi_network_tests.py

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
# specific language governing permissions and limitations
1616
# under the License.
1717

18-
import pytest
1918

19+
from selenium.webdriver.common.bidi.browsing_context import ReadinessState
2020
from selenium.webdriver.common.bidi.network import Request
2121
from selenium.webdriver.common.by import By
2222

@@ -68,29 +68,26 @@ def callback(request: Request):
6868
assert driver.find_element(By.NAME, "login").is_displayed(), "Request not continued"
6969

7070

71-
@pytest.mark.xfail_chrome
72-
@pytest.mark.xfail_edge
7371
def test_continue_request(driver, pages):
7472
def callback(request: Request):
7573
request.continue_request()
7674

7775
callback_id = driver.network.add_request_handler("before_request", callback)
7876
assert callback_id is not None, "Request handler not added"
79-
pages.load("formPage.html")
77+
url = pages.url("formPage.html")
78+
driver.browsing_context.navigate(context=driver.current_window_handle, url=url, wait=ReadinessState.COMPLETE)
8079
assert driver.find_element(By.NAME, "login").is_displayed(), "Request not continued"
8180

8281

83-
@pytest.mark.xfail_chrome
84-
@pytest.mark.xfail_edge
8582
def test_continue_with_auth(driver):
86-
callback_id = driver.network.add_auth_handler("user", "passwd")
83+
callback_id = driver.network.add_auth_handler("postman", "password")
8784
assert callback_id is not None, "Request handler not added"
88-
driver.get("https://httpbin.org/basic-auth/user/passwd")
85+
driver.browsing_context.navigate(
86+
context=driver.current_window_handle, url="https://postman-echo.com/basic-auth", wait=ReadinessState.COMPLETE
87+
)
8988
assert "authenticated" in driver.page_source, "Authorization failed"
9089

9190

92-
@pytest.mark.xfail_chrome
93-
@pytest.mark.xfail_edge
9491
def test_remove_auth_handler(driver):
9592
callback_id = driver.network.add_auth_handler("user", "passwd")
9693
assert callback_id is not None, "Request handler not added"

py/tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ commands =
4343
[testenv:linting]
4444
skip_install = true
4545
deps =
46-
ruff==0.12.3
46+
ruff==0.12.10
4747
commands =
4848
ruff check --fix --show-fixes --exit-non-zero-on-fix .
4949
ruff format --exit-non-zero-on-format .

0 commit comments

Comments
 (0)