Skip to content

Commit 6e52ec8

Browse files
authored
Merge branch 'SeleniumHQ:trunk' into py-bump-requirements
2 parents 2c887b3 + 6c53551 commit 6e52ec8

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

dotnet/src/webdriver/BiDi/Modules/Network/BytesValue.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
// under the License.
1818
// </copyright>
1919

20+
using System;
2021
using System.Text.Json.Serialization;
2122

2223
namespace OpenQA.Selenium.BiDi.Modules.Network;
@@ -27,6 +28,7 @@ namespace OpenQA.Selenium.BiDi.Modules.Network;
2728
public abstract record BytesValue
2829
{
2930
public static implicit operator BytesValue(string value) => new StringBytesValue(value);
31+
public static implicit operator BytesValue(byte[] value) => new Base64BytesValue(Convert.ToBase64String(value));
3032
}
3133

3234
public record StringBytesValue(string Value) : BytesValue;

java/src/org/openqa/selenium/chromium/ChromiumDriver.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ public void launchApp(String id) {
322322
public Map<String, Object> executeCdpCommand(String commandName, Map<String, Object> parameters) {
323323
Require.nonNull("Command Name", commandName);
324324
if (this.cdp == null) {
325-
return java.util.Collections.emptyMap();
325+
return Map.of();
326326
}
327327

328328
return cdp.executeCdpCommand(commandName, parameters);
@@ -363,7 +363,7 @@ public Optional<BiDi> maybeGetBiDi() {
363363
@Override
364364
public List<Map<String, String>> getCastSinks() {
365365
if (this.casting == null) {
366-
return java.util.Collections.emptyList();
366+
return List.of();
367367
}
368368

369369
return casting.getCastSinks();

0 commit comments

Comments
 (0)