Skip to content

Commit 2b91cd4

Browse files
authored
Merge branch 'trunk' into java-websocket-port-bidi
2 parents 3dc136b + a23bc9f commit 2b91cd4

38 files changed

+115
-1646
lines changed

.github/workflows/stale.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
steps:
1919
- uses: actions/stale@v9
2020
with:
21-
stale-issue-message: 'This issue is stale because it has been open 280 days with no activity. Remove stale label or comment or this will be closed in 14 days.'
21+
stale-issue-message: 'This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 14 days.'
2222
close-issue-message: 'This issue was closed because it has been stalled for 14 days with no activity.'
2323
stale-issue-label: 'J-stale'
2424
stale-pr-label: 'J-stale'

MODULE.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ bazel_dep(name = "rules_ruby", version = "0.19.0")
3131
# Until `rules_jvm_external` 6.8 ships
3232
git_override(
3333
module_name = "rules_jvm_external",
34-
commit = "29c451d2a62aa2451f5810c005ecac925b4772b6",
34+
commit = "aca619b117c1fe306ffdd20c5f47cc4dbd5effed",
3535
patch_strip = 1,
3636
patches = ["//java:rules_jvm_external_javadoc.patch"],
3737
remote = "https://github.com/bazel-contrib/rules_jvm_external.git",

common/repositories.bzl

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ js_library(
5050

5151
http_archive(
5252
name = "linux_beta_firefox",
53-
url = "https://ftp.mozilla.org/pub/firefox/releases/141.0b4/linux-x86_64/en-US/firefox-141.0b4.tar.xz",
54-
sha256 = "04e66e3e8a7512d2f45b69fe9385c6820182e7b8addfaac218ee10a108a08e6b",
53+
url = "https://ftp.mozilla.org/pub/firefox/releases/141.0b6/linux-x86_64/en-US/firefox-141.0b6.tar.xz",
54+
sha256 = "24ee93812f5943a940c6fe9231726a2c6dce10e1767204d5127d8cdafdf257b5",
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/141.0b4/mac/en-US/Firefox%20141.0b4.dmg",
76-
sha256 = "edcd3074f81a3e318aa672db0ec48f2c57c9eebbe9275e22fd64a42c9eb8d29b",
75+
url = "https://ftp.mozilla.org/pub/firefox/releases/141.0b6/mac/en-US/Firefox%20141.0b6.dmg",
76+
sha256 = "26ff8ba6534ee8c15a7b55fc4a38bde1e72c515c878b0abbe87b4dd8993f81db",
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/3c804dbf-368d-489d-8836-9756b2d4b017/MicrosoftEdge-138.0.3351.55.pkg",
127-
sha256 = "1ff1aecb62fe10151a4ebfd05b9834a4d94955d7f58ba434b2576468381c0f9b",
126+
url = "https://msedge.sf.dl.delivery.mp.microsoft.com/filestreamingservice/files/84bbc955-86c8-45ec-a520-da2c4026e2e1/MicrosoftEdge-138.0.3351.65.pkg",
127+
sha256 = "ff125c9e9f5e15372e3a62affa4bb63ada11cb49226c78de1ca5b1b6ffdc3a1b",
128128
move = {
129-
"MicrosoftEdge-138.0.3351.55.pkg/Payload/Microsoft Edge.app": "Edge.app",
129+
"MicrosoftEdge-138.0.3351.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_138.0.3351.55-1_amd64.deb",
147-
sha256 = "4990ad02387363c06ac0cf48312db4f35456c514fee20420ae3bdeedabccec1a",
146+
url = "https://packages.microsoft.com/repos/edge/pool/main/m/microsoft-edge-stable/microsoft-edge-stable_138.0.3351.65-1_amd64.deb",
147+
sha256 = "fbc6d5de9c2862fa787b47891e3e7f352bb5e50885c1526e1b1149912efa8302",
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/138.0.3351.55/edgedriver_linux64.zip",
169-
sha256 = "cfa15f718ea556a1bbc845fafe53909eaa2572058f8cb485a5c637df217e9b60",
168+
url = "https://msedgedriver.azureedge.net/138.0.3351.65/edgedriver_linux64.zip",
169+
sha256 = "48da0a21583fe4cbf5a2d720d344443d22517b2813d9c72a5adcf064e2fa336e",
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/138.0.3351.55/edgedriver_mac64.zip",
186-
sha256 = "fd5f5d567e3cc9f3735f496dab08c5f51f555ebf7cc19f16e1a52ebad2082022",
185+
url = "https://msedgedriver.azureedge.net/138.0.3351.65/edgedriver_mac64.zip",
186+
sha256 = "17307f5a12531c0e3209522ff1887fe37aaf896c27c0148157ba54f347f50492",
187187
build_file_content = """
188188
load("@aspect_rules_js//js:defs.bzl", "js_library")
189189
package(default_visibility = ["//visibility:public"])

java/spotbugs-excludes.xml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -63,16 +63,6 @@
6363
<Bug pattern="NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE"/>
6464
</Match>
6565

66-
<Match>
67-
<Class name="org.openqa.selenium.firefox.Executable"/>
68-
<Bug pattern="NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE"/>
69-
</Match>
70-
71-
<Match>
72-
<Class name="org.openqa.selenium.firefox.FirefoxBinary"/>
73-
<Bug pattern="DMI_HARDCODED_ABSOLUTE_FILENAME,NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE"/>
74-
</Match>
75-
7666
<Match>
7767
<Class name="org.openqa.selenium.firefox.FirefoxDriver"/>
7868
<Bug pattern="NP_BOOLEAN_RETURN_NULL,UUF_UNUSED_PUBLIC_OR_PROTECTED_FIELD"/>

java/src/org/openqa/selenium/BUILD.bazel

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ java_export(
1313
srcs = glob([
1414
"*.java",
1515
"federatedcredentialmanagement/*.java",
16-
"html5/*.java",
1716
"internal/*.java",
1817
"interactions/**/*.java",
1918
"logging/**/*.java",

java/src/org/openqa/selenium/Keys.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ public enum Keys implements CharSequence {
119119
RIGHT_COMMAND('\uE053'),
120120

121121
// Symbolic macOS keys not yet standardized
122-
OPTION('\uE050'), // TODO: verify Unicode value with WebDriver spec
122+
OPTION('\uE052'),
123123
FN('\uE051'), // TODO: symbolic only; confirm or remove in future
124124

125125
ZENKAKU_HANKAKU('\uE040');

java/src/org/openqa/selenium/PersistentCapabilities.java

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,9 @@
1717

1818
package org.openqa.selenium;
1919

20-
import java.util.Collections;
2120
import java.util.Map;
2221
import java.util.Set;
2322
import java.util.function.Function;
24-
import java.util.stream.Collector;
2523
import java.util.stream.Collectors;
2624
import java.util.stream.Stream;
2725
import org.openqa.selenium.internal.Require;
@@ -58,7 +56,7 @@ public PersistentCapabilities setCapability(String name, Object value) {
5856
@Override
5957
public Map<String, Object> asMap() {
6058
return getCapabilityNames().stream()
61-
.collect(toUnmodifiableMap(Function.identity(), this::getCapability));
59+
.collect(Collectors.toUnmodifiableMap(Function.identity(), this::getCapability));
6260
}
6361

6462
@Override
@@ -81,19 +79,7 @@ public Capabilities merge(Capabilities other) {
8179
public Set<String> getCapabilityNames() {
8280
return Stream.concat(
8381
caps.getCapabilityNames().stream(), overrides.getCapabilityNames().stream())
84-
.collect(toUnmodifiableSet());
85-
}
86-
87-
// Needed, since we're dependent on Java 8 as a minimum version
88-
private <T, K, U> Collector<T, ?, Map<K, U>> toUnmodifiableMap(
89-
Function<? super T, ? extends K> keyMapper, Function<? super T, ? extends U> valueMapper) {
90-
return Collectors.collectingAndThen(
91-
Collectors.toMap(keyMapper, valueMapper), Collections::unmodifiableMap);
92-
}
93-
94-
// Needed, since we're dependent on Java 8 as a minimum version
95-
private <T> Collector<T, ?, Set<T>> toUnmodifiableSet() {
96-
return Collectors.collectingAndThen(Collectors.toSet(), Collections::unmodifiableSet);
82+
.collect(Collectors.toUnmodifiableSet());
9783
}
9884

9985
@Override

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

Lines changed: 1 addition & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -52,20 +52,13 @@
5252
import org.openqa.selenium.devtools.DevTools;
5353
import org.openqa.selenium.devtools.HasDevTools;
5454
import org.openqa.selenium.devtools.noop.NoOpCdpInfo;
55-
import org.openqa.selenium.html5.LocalStorage;
56-
import org.openqa.selenium.html5.Location;
57-
import org.openqa.selenium.html5.LocationContext;
58-
import org.openqa.selenium.html5.SessionStorage;
59-
import org.openqa.selenium.html5.WebStorage;
6055
import org.openqa.selenium.internal.Require;
6156
import org.openqa.selenium.json.TypeToken;
6257
import org.openqa.selenium.logging.EventType;
6358
import org.openqa.selenium.logging.HasLogEvents;
6459
import org.openqa.selenium.remote.CommandExecutor;
6560
import org.openqa.selenium.remote.FileDetector;
6661
import org.openqa.selenium.remote.RemoteWebDriver;
67-
import org.openqa.selenium.remote.html5.RemoteLocationContext;
68-
import org.openqa.selenium.remote.html5.RemoteWebStorage;
6962
import org.openqa.selenium.remote.http.ClientConfig;
7063
import org.openqa.selenium.remote.http.ConnectionFailedException;
7164
import org.openqa.selenium.remote.http.HttpClient;
@@ -83,17 +76,13 @@ public class ChromiumDriver extends RemoteWebDriver
8376
HasLaunchApp,
8477
HasLogEvents,
8578
HasNetworkConditions,
86-
HasPermissions,
87-
LocationContext,
88-
WebStorage {
79+
HasPermissions {
8980

9081
public static final Predicate<String> IS_CHROMIUM_BROWSER =
9182
name -> CHROME.is(name) || EDGE.is(name) || OPERA.is(name);
9283
private static final Logger LOG = Logger.getLogger(ChromiumDriver.class.getName());
9384

9485
private final Capabilities capabilities;
95-
private final RemoteLocationContext locationContext;
96-
private final RemoteWebStorage webStorage;
9786
private final HasNetworkConditions networkConditions;
9887
private final HasPermissions permissions;
9988
private final HasLaunchApp launch;
@@ -108,8 +97,6 @@ public class ChromiumDriver extends RemoteWebDriver
10897
protected ChromiumDriver(
10998
CommandExecutor commandExecutor, Capabilities capabilities, String capabilityKey) {
11099
super(commandExecutor, capabilities);
111-
locationContext = new RemoteLocationContext(getExecuteMethod());
112-
webStorage = new RemoteWebStorage(getExecuteMethod());
113100
permissions = new AddHasPermissions().getImplementation(getCapabilities(), getExecuteMethod());
114101
networkConditions =
115102
new AddHasNetworkConditions().getImplementation(getCapabilities(), getExecuteMethod());
@@ -287,31 +274,6 @@ public void register(Predicate<URI> whenThisMatches, Supplier<Credentials> useTh
287274
getDevTools().getDomains().network().addAuthHandler(whenThisMatches, useTheseCredentials);
288275
}
289276

290-
@Override
291-
@Deprecated
292-
public LocalStorage getLocalStorage() {
293-
return webStorage.getLocalStorage();
294-
}
295-
296-
@Override
297-
@Deprecated
298-
public SessionStorage getSessionStorage() {
299-
return webStorage.getSessionStorage();
300-
}
301-
302-
@Override
303-
@Deprecated
304-
public Location location() {
305-
return locationContext.location();
306-
}
307-
308-
@Override
309-
@Deprecated
310-
public void setLocation(Location location) {
311-
Require.nonNull("Location", location);
312-
locationContext.setLocation(location);
313-
}
314-
315277
@Override
316278
public void launchApp(String id) {
317279
Require.nonNull("Launch App ID", id);

java/src/org/openqa/selenium/edge/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,6 @@ java_export(
2121
"//java/src/org/openqa/selenium/chromium",
2222
"//java/src/org/openqa/selenium/manager",
2323
"//java/src/org/openqa/selenium/remote",
24+
"@maven//:org_jspecify_jspecify",
2425
],
2526
)

java/src/org/openqa/selenium/edge/EdgeDriverService.java

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
import java.util.List;
3030
import java.util.Locale;
3131
import java.util.Map;
32+
import org.jspecify.annotations.Nullable;
3233
import org.openqa.selenium.Capabilities;
3334
import org.openqa.selenium.WebDriverException;
3435
import org.openqa.selenium.chromium.ChromiumDriverLogLevel;
@@ -96,11 +97,11 @@ public class EdgeDriverService extends DriverService {
9697
* @throws IOException If an I/O error occurs.
9798
*/
9899
public EdgeDriverService(
99-
File executable,
100+
@Nullable File executable,
100101
int port,
101-
Duration timeout,
102-
List<String> args,
103-
Map<String, String> environment)
102+
@Nullable Duration timeout,
103+
@Nullable List<String> args,
104+
@Nullable Map<String, String> environment)
104105
throws IOException {
105106
super(executable, port, timeout, List.copyOf(args), Map.copyOf(environment));
106107
}
@@ -139,13 +140,13 @@ public static EdgeDriverService createDefaultService() {
139140
@AutoService(DriverService.Builder.class)
140141
public static class Builder extends DriverService.Builder<EdgeDriverService, Builder> {
141142

142-
private Boolean disableBuildCheck;
143-
private Boolean readableTimestamp;
144-
private Boolean appendLog;
145-
private Boolean verbose;
146-
private Boolean silent;
147-
private String allowedListIps;
148-
private ChromiumDriverLogLevel logLevel;
143+
@Nullable private Boolean disableBuildCheck;
144+
@Nullable private Boolean readableTimestamp;
145+
@Nullable private Boolean appendLog;
146+
@Nullable private Boolean verbose;
147+
@Nullable private Boolean silent;
148+
@Nullable private String allowedListIps;
149+
@Nullable private ChromiumDriverLogLevel logLevel;
149150

150151
@Override
151152
public int score(Capabilities capabilities) {
@@ -196,7 +197,7 @@ public Builder withBuildCheckDisabled(boolean noBuildCheck) {
196197
* @param logLevel {@link ChromiumDriverLogLevel} for desired log level output.
197198
* @return A self reference.
198199
*/
199-
public Builder withLoglevel(ChromiumDriverLogLevel logLevel) {
200+
public Builder withLoglevel(@Nullable ChromiumDriverLogLevel logLevel) {
200201
this.logLevel = logLevel;
201202
this.silent = false;
202203
this.verbose = false;
@@ -238,7 +239,7 @@ public Builder withVerbose(boolean verbose) {
238239
* @param allowedListIps Comma-separated list of remote IPv4 addresses.
239240
* @return A self reference.
240241
*/
241-
public Builder withAllowedListIps(String allowedListIps) {
242+
public Builder withAllowedListIps(@Nullable String allowedListIps) {
242243
this.allowedListIps = allowedListIps;
243244
return this;
244245
}
@@ -249,7 +250,7 @@ public Builder withAllowedListIps(String allowedListIps) {
249250
* @param readableTimestamp Whether the timestamp of the log is readable.
250251
* @return A self reference.
251252
*/
252-
public Builder withReadableTimestamp(Boolean readableTimestamp) {
253+
public Builder withReadableTimestamp(@Nullable Boolean readableTimestamp) {
253254
this.readableTimestamp = readableTimestamp;
254255
return this;
255256
}
@@ -321,7 +322,11 @@ protected List<String> createArgs() {
321322

322323
@Override
323324
protected EdgeDriverService createDriverService(
324-
File exe, int port, Duration timeout, List<String> args, Map<String, String> environment) {
325+
@Nullable File exe,
326+
int port,
327+
@Nullable Duration timeout,
328+
@Nullable List<String> args,
329+
@Nullable Map<String, String> environment) {
325330
try {
326331
return new EdgeDriverService(exe, port, timeout, args, environment);
327332
} catch (IOException e) {

0 commit comments

Comments
 (0)