Skip to content

Commit caeed48

Browse files
authored
Merge branch 'trunk' into py_use_env_driver_location
2 parents 421d9df + 61d5f45 commit caeed48

File tree

10 files changed

+71
-53
lines changed

10 files changed

+71
-53
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/130.0.1/linux-x86_64/en-US/firefox-130.0.1.tar.bz2",
15-
sha256 = "3b9cd7fe7d22f0960ee5a058e3c9e6b507814958ec5a9ac691cbd5ebd0895c93",
14+
url = "https://ftp.mozilla.org/pub/firefox/releases/131.0/linux-x86_64/en-US/firefox-131.0.tar.bz2",
15+
sha256 = "4ca8504a62a31472ecb8c3a769d4301dd4ac692d4cc5d51b8fe2cf41e7b11106",
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/130.0.1/mac/en-US/Firefox%20130.0.1.dmg",
37-
sha256 = "63ed878485d5498c269d95ba7e64f1104ed085b8e330b0ef0a565f85cc603426",
36+
url = "https://ftp.mozilla.org/pub/firefox/releases/131.0/mac/en-US/Firefox%20131.0.dmg",
37+
sha256 = "cd243b44746f56ee2042572cccab2736c0c6d419f85f90ad163a4ba04979ccb2",
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/131.0b8/linux-x86_64/en-US/firefox-131.0b8.tar.bz2",
54-
sha256 = "53a6c775688243908d5d010c9c14eda488d20faabb966be31fd49d711b89f1e1",
53+
url = "https://ftp.mozilla.org/pub/firefox/releases/132.0b2/linux-x86_64/en-US/firefox-132.0b2.tar.bz2",
54+
sha256 = "f4fb251b50661f27a5f4d87a3dc2839ed329793e232aca47b146d84384208167",
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/131.0b8/mac/en-US/Firefox%20131.0b8.dmg",
76-
sha256 = "8acb3265bdf9859abfbb58604f5b253a0efe1fab7b82d4ae7d3983706ac5427b",
75+
url = "https://ftp.mozilla.org/pub/firefox/releases/132.0b2/mac/en-US/Firefox%20132.0b2.dmg",
76+
sha256 = "b7be772dc40c7065580e8556f7f037ae1f2960be0276c6f04ed453d4543712a1",
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/28b1932d-413c-4868-b79f-f72482800efb/MicrosoftEdge-128.0.2739.79.pkg",
127-
sha256 = "8bcdd29a37414136e46860acb6c151d3ae1f9ef1ee62464a0d00a7eda71b5e29",
126+
url = "https://msedge.sf.dl.delivery.mp.microsoft.com/filestreamingservice/files/1077769e-236a-4f55-801d-2f782881fe18/MicrosoftEdge-129.0.2792.65.pkg",
127+
sha256 = "a89a37ddfd655c47a44401a157c6a903f04a87622b64faa86d3897f5506f7481",
128128
move = {
129-
"MicrosoftEdge-128.0.2739.79.pkg/Payload/Microsoft Edge.app": "Edge.app",
129+
"MicrosoftEdge-129.0.2792.65.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_128.0.2739.79-1_amd64.deb",
147-
sha256 = "6238024b9d240927b76bb199021fe6e804d04759b61992638871755f5cc444f5",
146+
url = "https://packages.microsoft.com/repos/edge/pool/main/m/microsoft-edge-stable/microsoft-edge-stable_129.0.2792.65-1_amd64.deb",
147+
sha256 = "c6e0ad1e9b44d821b86a263b82edac596dca9b8a9f07413f2ff3c100221a28e7",
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/128.0.2739.81/edgedriver_linux64.zip",
169-
sha256 = "66a7b7fca41920c813263642ee5be105bb3b18f89fa09319a3b681ccf608aeb5",
168+
url = "https://msedgedriver.azureedge.net/129.0.2792.65/edgedriver_linux64.zip",
169+
sha256 = "36811ca6700532a98c27f696f79aa06762d882408645e6d6a09f3ed2673a6951",
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/128.0.2739.81/edgedriver_mac64.zip",
186-
sha256 = "554b60f5863f13db237bbba75fa8bac52517c364104dc859df0b457804ed10c9",
185+
url = "https://msedgedriver.azureedge.net/129.0.2792.65/edgedriver_mac64.zip",
186+
sha256 = "53d7dd53564cf20aaf51d505b364f28d30a83d38b87a08d6bf22d26e04d17c2b",
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/129.0.6668.58/linux64/chrome-linux64.zip",
203-
sha256 = "0918cb647b186f6e429a90e67a716489cf96d0295da8a3a8c40a441379708ba9",
202+
url = "https://storage.googleapis.com/chrome-for-testing-public/129.0.6668.89/linux64/chrome-linux64.zip",
203+
sha256 = "fd61ba345c840c6d5404d8abdb42c5d86832b212e9bc401a72dc86495c0cd7d3",
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/129.0.6668.58/mac-x64/chrome-mac-x64.zip",
225-
sha256 = "2f1c317cde0ba19be2f4e731cb77fc0b45ec423781c099ae5208228abedd1359",
224+
url = "https://storage.googleapis.com/chrome-for-testing-public/129.0.6668.89/mac-x64/chrome-mac-x64.zip",
225+
sha256 = "dd67b65ed1eac994032b02d48c6aaeef7c0a20ba0450bf124e2fb558a1ab4a1b",
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/129.0.6668.58/linux64/chromedriver-linux64.zip",
247-
sha256 = "0fc68a18a9db153e98521ca1654bb3fd7842ad4552f98ec8ec6688e907efd9b1",
246+
url = "https://storage.googleapis.com/chrome-for-testing-public/129.0.6668.89/linux64/chromedriver-linux64.zip",
247+
sha256 = "0dafb169734d3fc79171cabcecb07131bfb6a1727859118b756a020211b6c804",
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/129.0.6668.58/mac-x64/chromedriver-mac-x64.zip",
265-
sha256 = "df4df07aa534e1c082c252e54959c4caf2af1eed3d4631852e683971ffdec6cb",
264+
url = "https://storage.googleapis.com/chrome-for-testing-public/129.0.6668.89/mac-x64/chromedriver-mac-x64.zip",
265+
sha256 = "71663c3f70fe3eb2256c474c60fa7ee1c15065f38b6c679e6c2d46960e774b1e",
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/Transport/WebSocketTransport.cs

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@ public class WebSocketTransport(Uri _uri) : ITransport, IDisposable
1616
private readonly ClientWebSocket _webSocket = new();
1717
private readonly ArraySegment<byte> _receiveBuffer = new(new byte[1024 * 8]);
1818

19+
private readonly SemaphoreSlim _socketSendSemaphoreSlim = new(1, 1);
20+
1921
public async Task ConnectAsync(CancellationToken cancellationToken)
2022
{
21-
_webSocket.Options.SetBuffer(_receiveBuffer.Count, _receiveBuffer.Count, _receiveBuffer);
2223
await _webSocket.ConnectAsync(_uri, cancellationToken).ConfigureAwait(false);
2324
}
2425

@@ -32,8 +33,9 @@ public async Task<T> ReceiveAsJsonAsync<T>(JsonSerializerOptions jsonSerializerO
3233
{
3334
result = await _webSocket.ReceiveAsync(_receiveBuffer, cancellationToken).ConfigureAwait(false);
3435

35-
await ms.WriteAsync(_receiveBuffer.Array!, _receiveBuffer.Offset, result.Count).ConfigureAwait(false);
36-
} while (!result.EndOfMessage);
36+
await ms.WriteAsync(_receiveBuffer.Array!, _receiveBuffer.Offset, result.Count, cancellationToken).ConfigureAwait(false);
37+
}
38+
while (!result.EndOfMessage);
3739

3840
ms.Seek(0, SeekOrigin.Begin);
3941

@@ -51,12 +53,21 @@ public async Task SendAsJsonAsync(Command command, JsonSerializerOptions jsonSer
5153
{
5254
var buffer = JsonSerializer.SerializeToUtf8Bytes(command, typeof(Command), jsonSerializerOptions);
5355

54-
if (_logger.IsEnabled(LogEventLevel.Trace))
56+
await _socketSendSemaphoreSlim.WaitAsync(cancellationToken);
57+
58+
try
5559
{
56-
_logger.Trace($"BiDi SND >> {buffer.Length} > {Encoding.UTF8.GetString(buffer)}");
57-
}
60+
if (_logger.IsEnabled(LogEventLevel.Trace))
61+
{
62+
_logger.Trace($"BiDi SND >> {buffer.Length} > {Encoding.UTF8.GetString(buffer)}");
63+
}
5864

59-
await _webSocket.SendAsync(new ArraySegment<byte>(buffer), WebSocketMessageType.Text, true, cancellationToken).ConfigureAwait(false);
65+
await _webSocket.SendAsync(new ArraySegment<byte>(buffer), WebSocketMessageType.Text, true, cancellationToken).ConfigureAwait(false);
66+
}
67+
finally
68+
{
69+
_socketSendSemaphoreSlim.Release();
70+
}
6071
}
6172

6273
public void Dispose()

dotnet/src/webdriver/Remote/HttpCommandExecutor.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
using System;
2222
using System.Collections.Generic;
2323
using System.Globalization;
24+
using System.Linq;
2425
using System.Net;
2526
using System.Net.Http;
2627
using System.Net.Http.Headers;
@@ -417,7 +418,11 @@ protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage
417418
var responseTask = base.SendAsync(request, cancellationToken);
418419

419420
StringBuilder requestLogMessageBuilder = new();
420-
requestLogMessageBuilder.AppendFormat(">> {0}", request);
421+
requestLogMessageBuilder.AppendFormat(">> {0} RequestUri: {1}, Content: {2}, Headers: {3}",
422+
request.Method,
423+
request.RequestUri?.ToString() ?? "null",
424+
request.Content?.ToString() ?? "null",
425+
request.Headers?.Count());
421426

422427
if (request.Content != null)
423428
{
@@ -430,7 +435,7 @@ protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage
430435
var response = await responseTask.ConfigureAwait(false);
431436

432437
StringBuilder responseLogMessageBuilder = new();
433-
responseLogMessageBuilder.AppendFormat("<< {0}", response);
438+
responseLogMessageBuilder.AppendFormat("<< StatusCode: {0}, ReasonPhrase: {1}, Content: {2}, Headers: {3}", (int)response.StatusCode, response.ReasonPhrase, response.Content, response.Headers?.Count());
434439

435440
if (!response.IsSuccessStatusCode && response.Content != null)
436441
{

dotnet/test/common/DevTools/DevToolsNetworkTest.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,9 +386,10 @@ public async Task VerifyRequestPostData()
386386
if (string.Compare(e.Request.Method, "post", StringComparison.OrdinalIgnoreCase) == 0)
387387
{
388388
requestIds[0] = e.RequestId;
389+
requestSync.Set();
389390
}
390-
requestSync.Set();
391391
};
392+
392393
domains.Network.RequestWillBeSent += requestWillBeSentHandler;
393394

394395
driver.Url = EnvironmentManager.Instance.UrlBuilder.WhereIs("postForm.html");

java/src/org/openqa/selenium/remote/HttpCommandExecutor.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@
4444
public class HttpCommandExecutor implements CommandExecutor, NeedsLocalLogs {
4545

4646
private final URL remoteServer;
47-
private final HttpClient client;
47+
public final HttpClient client;
4848
private final HttpClient.Factory httpClientFactory;
4949
private final Map<String, CommandInfo> additionalCommands;
50-
private CommandCodec<HttpRequest> commandCodec;
51-
private ResponseCodec<HttpResponse> responseCodec;
50+
protected CommandCodec<HttpRequest> commandCodec;
51+
protected ResponseCodec<HttpResponse> responseCodec;
5252

5353
private LocalLogs logs = LocalLogs.getNullLogger();
5454

java/src/org/openqa/selenium/remote/RemoteWebDriver.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ public class RemoteWebDriver
118118
private Level level = Level.FINE;
119119
private ErrorHandler errorHandler = new ErrorHandler();
120120
private CommandExecutor executor;
121-
private Capabilities capabilities;
121+
protected Capabilities capabilities;
122122
private SessionId sessionId;
123123
private FileDetector fileDetector = new UselessFileDetector();
124124
private ExecuteMethod executeMethod;

java/src/org/openqa/selenium/remote/service/DriverService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ private enum StartOrDie {
355355
public abstract static class Builder<DS extends DriverService, B extends Builder<?, ?>> {
356356

357357
private int port = 0;
358-
private File exe = null;
358+
public File exe = null;
359359
private Map<String, String> environment = emptyMap();
360360
private File logFile;
361361
private Duration timeout;

java/src/org/openqa/selenium/support/ui/FluentWait.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,15 @@ public class FluentWait<T> implements Wait<T> {
6666

6767
private static final Duration DEFAULT_WAIT_DURATION = Duration.ofMillis(DEFAULT_SLEEP_TIMEOUT);
6868

69-
private final T input;
70-
private final java.time.Clock clock;
71-
private final Sleeper sleeper;
69+
protected final T input;
70+
protected final java.time.Clock clock;
71+
protected final Sleeper sleeper;
7272

73-
private Duration timeout = DEFAULT_WAIT_DURATION;
74-
private Duration interval = DEFAULT_WAIT_DURATION;
75-
private Supplier<String> messageSupplier = () -> null;
73+
protected Duration timeout = DEFAULT_WAIT_DURATION;
74+
protected Duration interval = DEFAULT_WAIT_DURATION;
75+
protected Supplier<String> messageSupplier = () -> null;
7676

77-
private final List<Class<? extends Throwable>> ignoredExceptions = new ArrayList<>();
77+
protected final List<Class<? extends Throwable>> ignoredExceptions = new ArrayList<>();
7878

7979
/**
8080
* @param input The input value to pass to the evaluated conditions.

py/selenium/webdriver/common/bidi/session.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,26 +16,30 @@
1616
# under the License.
1717

1818

19-
def session_subscribe(*events, browsing_contexts=[]):
19+
def session_subscribe(*events, browsing_contexts=None):
2020
cmd_dict = {
2121
"method": "session.subscribe",
2222
"params": {
2323
"events": events,
2424
},
2525
}
26+
if browsing_contexts is None:
27+
browsing_contexts = []
2628
if browsing_contexts:
2729
cmd_dict["params"]["browsingContexts"] = browsing_contexts
2830
_ = yield cmd_dict
2931
return None
3032

3133

32-
def session_unsubscribe(*events, browsing_contexts=[]):
34+
def session_unsubscribe(*events, browsing_contexts=None):
3335
cmd_dict = {
3436
"method": "session.unsubscribe",
3537
"params": {
3638
"events": events,
3739
},
3840
}
41+
if browsing_contexts is None:
42+
browsing_contexts = []
3943
if browsing_contexts:
4044
cmd_dict["params"]["browsingContexts"] = browsing_contexts
4145
_ = yield cmd_dict

py/test/selenium/webdriver/common/network.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,7 @@
2525

2626
def get_interface_ip(ifname):
2727
def _bytes(value, encoding):
28-
try:
29-
return bytes(value, encoding) # Python 3
30-
except TypeError:
31-
return value # Python 2
28+
return bytes(value, encoding)
3229

3330
sckt = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
3431
return socket.inet_ntoa(

0 commit comments

Comments
 (0)