Skip to content

Commit 35995bc

Browse files
authored
Merge branch 'trunk' into py_client_config_new
2 parents 3d209cb + 9504dcd commit 35995bc

File tree

25 files changed

+188
-92
lines changed

25 files changed

+188
-92
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/DevTools/DevToolsSession.cs

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
// limitations under the License.
1717
// </copyright>
1818

19+
using OpenQA.Selenium.Internal.Logging;
1920
using System;
2021
using System.Collections.Concurrent;
2122
using System.Globalization;
@@ -56,6 +57,8 @@ public class DevToolsSession : IDevToolsSession
5657
private DevToolsDomains domains;
5758
private readonly DevToolsOptions options;
5859

60+
private readonly static ILogger logger = Internal.Logging.Log.GetLogger<DevToolsSession>();
61+
5962
/// <summary>
6063
/// Initializes a new instance of the DevToolsSession class, using the specified WebSocket endpoint.
6164
/// </summary>
@@ -272,6 +275,11 @@ public T GetVersionSpecificDomains<T>() where T : DevToolsSessionDomains
272275

273276
if (this.connection != null && this.connection.IsActive)
274277
{
278+
if (logger.IsEnabled(LogEventLevel.Trace))
279+
{
280+
logger.Trace($"CDP SND >> {message.CommandId} {message.CommandName}: {commandParameters.ToJsonString()}");
281+
}
282+
275283
LogTrace("Sending {0} {1}: {2}", message.CommandId, message.CommandName, commandParameters.ToString());
276284

277285
string contents = JsonSerializer.Serialize(message);
@@ -540,6 +548,11 @@ private void MonitorMessageQueue()
540548

541549
private void ProcessMessage(string message)
542550
{
551+
if (logger.IsEnabled(LogEventLevel.Trace))
552+
{
553+
logger.Trace($"CDP RCV << {message}");
554+
}
555+
543556
var messageObject = JsonObject.Parse(message).AsObject();
544557

545558
if (messageObject.TryGetPropertyValue("id", out var idProperty))
@@ -583,7 +596,22 @@ private void ProcessMessage(string message)
583596
// DevTools commands that may be sent in the body of the attached
584597
// event handler. If thread pool starvation seems to become a problem,
585598
// we can switch to a channel-based queue.
586-
Task.Run(() => OnDevToolsEventReceived(new DevToolsEventReceivedEventArgs(methodParts[0], methodParts[1], eventData)));
599+
Task.Run(() =>
600+
{
601+
try
602+
{
603+
OnDevToolsEventReceived(new DevToolsEventReceivedEventArgs(methodParts[0], methodParts[1], eventData));
604+
}
605+
catch (Exception ex)
606+
{
607+
if (logger.IsEnabled(LogEventLevel.Warn))
608+
{
609+
logger.Warn($"CDP VNT ^^ Unhandled error occured in event handler of '{method}' method. {ex}");
610+
}
611+
612+
throw;
613+
}
614+
});
587615

588616
return;
589617
}

dotnet/src/webdriver/DriverService.cs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
// limitations under the License.
1717
// </copyright>
1818

19-
using OpenQA.Selenium.Internal.Logging;
2019
using OpenQA.Selenium.Remote;
2120
using System;
2221
using System.Diagnostics;
@@ -42,7 +41,6 @@ public abstract class DriverService : ICommandServer
4241
private bool isDisposed;
4342
private Process driverServiceProcess;
4443
private TimeSpan initializationTimeout = TimeSpan.FromSeconds(20);
45-
private readonly static ILogger logger = Log.GetLogger<DriverService>();
4644

4745
/// <summary>
4846
/// Initializes a new instance of the <see cref="DriverService"/> class.
@@ -238,10 +236,7 @@ protected virtual bool IsInitialized
238236
}
239237
catch (Exception ex) when (ex is HttpRequestException || ex is TaskCanceledException)
240238
{
241-
if (logger.IsEnabled(LogEventLevel.Trace))
242-
{
243-
logger.Trace(ex.ToString());
244-
}
239+
// Do nothing. The exception is expected, meaning driver service is not initialized.
245240
}
246241

247242
return isInitialized;

dotnet/src/webdriver/Logs.cs

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -76,29 +76,23 @@ public ReadOnlyCollection<string> AvailableLogTypes
7676
public ReadOnlyCollection<LogEntry> GetLog(string logKind)
7777
{
7878
List<LogEntry> entries = new List<LogEntry>();
79-
try
80-
{
81-
Dictionary<string, object> parameters = new Dictionary<string, object>();
82-
parameters.Add("type", logKind);
83-
Response commandResponse = this.driver.InternalExecute(DriverCommand.GetLog, parameters);
8479

85-
object[] responseValue = commandResponse.Value as object[];
86-
if (responseValue != null)
80+
Dictionary<string, object> parameters = new Dictionary<string, object>();
81+
parameters.Add("type", logKind);
82+
Response commandResponse = this.driver.InternalExecute(DriverCommand.GetLog, parameters);
83+
84+
object[] responseValue = commandResponse.Value as object[];
85+
if (responseValue != null)
86+
{
87+
foreach (object rawEntry in responseValue)
8788
{
88-
foreach (object rawEntry in responseValue)
89+
Dictionary<string, object> entryDictionary = rawEntry as Dictionary<string, object>;
90+
if (entryDictionary != null)
8991
{
90-
Dictionary<string, object> entryDictionary = rawEntry as Dictionary<string, object>;
91-
if (entryDictionary != null)
92-
{
93-
entries.Add(LogEntry.FromDictionary(entryDictionary));
94-
}
92+
entries.Add(LogEntry.FromDictionary(entryDictionary));
9593
}
9694
}
9795
}
98-
catch (NotImplementedException)
99-
{
100-
// Swallow for backwards compatibility
101-
}
10296

10397
return entries.AsReadOnly();
10498
}

dotnet/src/webdriver/Remote/W3CWireProtocolCommandInfoRepository.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,8 @@ protected override void InitializeCommandDictionary()
133133
// local-end implementation of WebDriver.
134134
this.TryAddCommand(DriverCommand.IsElementDisplayed, new HttpCommandInfo(HttpCommandInfo.GetCommand, "/session/{sessionId}/element/{id}/displayed"));
135135
this.TryAddCommand(DriverCommand.ElementEquals, new HttpCommandInfo(HttpCommandInfo.GetCommand, "/session/{sessionId}/element/{id}/equals/{other}"));
136+
this.TryAddCommand(DriverCommand.GetLog, new HttpCommandInfo(HttpCommandInfo.PostCommand, "/session/{sessionId}/se/log"));
137+
this.TryAddCommand(DriverCommand.GetAvailableLogTypes, new HttpCommandInfo(HttpCommandInfo.GetCommand, "/session/{sessionId}/se/log/types"));
136138
this.TryAddCommand(DriverCommand.UploadFile, new HttpCommandInfo(HttpCommandInfo.PostCommand, "/session/{sessionId}/se/file"));
137139
this.TryAddCommand(DriverCommand.GetDownloadableFiles, new HttpCommandInfo(HttpCommandInfo.GetCommand, "/session/{sessionId}/se/files"));
138140
this.TryAddCommand(DriverCommand.DownloadFile, new HttpCommandInfo(HttpCommandInfo.PostCommand, "/session/{sessionId}/se/files"));

dotnet/src/webdriver/Safari/SafariDriverService.cs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
// </copyright>
1818

1919
using OpenQA.Selenium.Internal;
20-
using OpenQA.Selenium.Internal.Logging;
2120
using System;
2221
using System.IO;
2322
using System.Net;
@@ -34,8 +33,6 @@ public sealed class SafariDriverService : DriverService
3433
{
3534
private const string DefaultSafariDriverServiceExecutableName = "safaridriver";
3635

37-
private readonly static ILogger logger = Log.GetLogger<SafariDriverService>();
38-
3936
/// <summary>
4037
/// Initializes a new instance of the <see cref="SafariDriverService"/> class.
4138
/// </summary>
@@ -130,10 +127,7 @@ protected override bool IsInitialized
130127
// check.
131128
catch (Exception ex) when (ex is HttpRequestException || ex is TaskCanceledException)
132129
{
133-
if (logger.IsEnabled(LogEventLevel.Trace))
134-
{
135-
logger.Trace(ex.ToString());
136-
}
130+
// Do nothing. The exception is expected, meaning driver service is not initialized.
137131
}
138132
}
139133
}

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");

javascript/node/selenium-webdriver/lib/network.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class Network {
3030

3131
// This should be done in the constructor.
3232
// But since it needs to call async methods we cannot do that in the constructor.
33-
// We can have a separate async method that initialises the Script instance.
33+
// We can have a separate async method that initialises the Network instance.
3434
// However, that pattern does not allow chaining the methods as we would like the user to use it.
3535
// Since it involves awaiting to get the instance and then another await to call the method.
3636
// Using this allows the user to do this "await driver.network.addAuthenticationHandler(callback)"

0 commit comments

Comments
 (0)