Skip to content

Commit 52fd7b0

Browse files
committed
merge latest
2 parents eea4a65 + 5596a53 commit 52fd7b0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+384
-389
lines changed

.github/workflows/ci-python.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ jobs:
2020
steps:
2121
- name: Checkout source tree
2222
uses: actions/checkout@v4
23-
- name: Set up Python 3.8
23+
- name: Set up Python 3.9
2424
uses: actions/setup-python@v4
2525
with:
26-
python-version: 3.8
26+
python-version: 3.9
2727
- name: Install dependencies
2828
run: |
2929
python -m pip install --upgrade pip
@@ -40,10 +40,10 @@ jobs:
4040
steps:
4141
- name: Checkout source tree
4242
uses: actions/checkout@v4
43-
- name: Set up Python 3.8
43+
- name: Set up Python 3.9
4444
uses: actions/setup-python@v4
4545
with:
46-
python-version: 3.8
46+
python-version: 3.9
4747
- name: Install dependencies
4848
run: |
4949
python -m pip install --upgrade pip
@@ -62,10 +62,10 @@ jobs:
6262
steps:
6363
- name: Checkout source tree
6464
uses: actions/checkout@v4
65-
- name: Set up Python 3.8
65+
- name: Set up Python 3.9
6666
uses: actions/setup-python@v4
6767
with:
68-
python-version: 3.8
68+
python-version: 3.9
6969
- name: Install dependencies
7070
run: |
7171
python -m pip install --upgrade pip

.github/workflows/nightly.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ jobs:
172172
with:
173173
name: Nightly JavaScript Release
174174
cache-key: javascript-nightly
175-
node-version: '18.x'
175+
node-version: '22.x'
176176
run: |
177177
sed -i 's|https://registry.npmjs.org/|https://npm.pkg.github.com|g' javascript/node/selenium-webdriver/package.json
178178
sed -i 's|"name": "selenium-webdriver"|"name": "@seleniumhq/selenium-webdriver"|g' javascript/node/selenium-webdriver/package.json

.github/workflows/update-documentation.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,10 @@ jobs:
107107
run: |
108108
git config --local user.email "[email protected]"
109109
git config --local user.name "Selenium CI Bot"
110-
- name: Set up Python 3.8
110+
- name: Set up Python 3.9
111111
uses: actions/setup-python@v5
112112
with:
113-
python-version: 3.8
113+
python-version: 3.9
114114
- name: Install dependencies
115115
run: |
116116
python -m pip install --upgrade pip

MODULE.bazel

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,11 @@ use_repo(oci, "chrome_standalone", "firefox_standalone", "java_image_base")
111111
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
112112
python.toolchain(
113113
is_default = True,
114-
python_version = "3.8",
114+
python_version = "3.9",
115115
)
116-
python.toolchain(python_version = "3.9")
117116
python.toolchain(python_version = "3.10")
118117
python.toolchain(python_version = "3.11")
118+
python.toolchain(python_version = "3.12")
119119
use_repo(python, "pythons_hub")
120120

121121
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
@@ -127,10 +127,10 @@ pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
127127
requirements_lock = "//py:requirements_lock.txt",
128128
)
129129
for version in [
130-
"3.8",
131130
"3.9",
132131
"3.10",
133132
"3.11",
133+
"3.12",
134134
]
135135
]
136136

@@ -216,7 +216,7 @@ maven.install(
216216
"org.junit.platform:junit-platform-reporting",
217217
"org.junit.platform:junit-platform-commons",
218218
"org.junit.platform:junit-platform-engine",
219-
"org.mockito:mockito-core:5.14.2",
219+
"org.mockito:mockito-core:5.15.2",
220220
"org.redisson:redisson:3.41.0",
221221
"org.slf4j:slf4j-api:2.0.16",
222222
"org.slf4j:slf4j-jdk14:2.0.16",

dotnet/src/webdriver/Safari/SafariDriverService.cs

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -87,56 +87,6 @@ protected override bool HasShutdown
8787
get { return false; }
8888
}
8989

90-
/// <summary>
91-
/// Gets a value indicating whether the service is responding to HTTP requests.
92-
/// </summary>
93-
protected override bool IsInitialized
94-
{
95-
get
96-
{
97-
bool isInitialized = false;
98-
99-
Uri serviceHealthUri = new Uri(this.ServiceUrl, new Uri("/session/FakeSessionIdForPollingPurposes", UriKind.Relative));
100-
101-
// Since Firefox driver won't implement the /session end point (because
102-
// the W3C spec working group stupidly decided that it isn't necessary),
103-
// we'll attempt to poll for a different URL which has no side effects.
104-
// We've chosen to poll on the "quit" URL, passing in a nonexistent
105-
// session id.
106-
using (var httpClient = new HttpClient())
107-
{
108-
httpClient.DefaultRequestHeaders.ConnectionClose = true;
109-
httpClient.Timeout = TimeSpan.FromSeconds(5);
110-
111-
using (var httpRequest = new HttpRequestMessage(HttpMethod.Delete, serviceHealthUri))
112-
{
113-
try
114-
{
115-
using (var httpResponse = Task.Run(async () => await httpClient.SendAsync(httpRequest)).GetAwaiter().GetResult())
116-
{
117-
isInitialized = (httpResponse.StatusCode == HttpStatusCode.OK
118-
|| httpResponse.StatusCode == HttpStatusCode.InternalServerError
119-
|| httpResponse.StatusCode == HttpStatusCode.NotFound)
120-
&& httpResponse.Content.Headers.ContentType.MediaType.StartsWith("application/json", StringComparison.OrdinalIgnoreCase);
121-
}
122-
}
123-
124-
// Checking the response from deleting a nonexistent session. Note that we are simply
125-
// checking that the HTTP status returned is a 200 status, and that the resposne has
126-
// the correct Content-Type header. A more sophisticated check would parse the JSON
127-
// response and validate its values. At the moment we do not do this more sophisticated
128-
// check.
129-
catch (Exception ex) when (ex is HttpRequestException || ex is TaskCanceledException)
130-
{
131-
// Do nothing. The exception is expected, meaning driver service is not initialized.
132-
}
133-
}
134-
}
135-
136-
return isInitialized;
137-
}
138-
}
139-
14090
/// <summary>
14191
/// Creates a default instance of the SafariDriverService.
14292
/// </summary>

dotnet/src/webdriver/assets/README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,11 @@ Selenium is a set of different software tools each with a different approach to
66
using OpenQA.Selenium.Chrome;
77
using OpenQA.Selenium;
88

9-
var driver = new ChromeDriver();
9+
using var driver = new ChromeDriver();
1010

1111
driver.Url = "https://www.google.com";
1212
driver.FindElement(By.Name("q")).SendKeys("webdriver" + Keys.Return);
1313
Console.WriteLine(driver.Title);
14-
15-
driver.Quit();
1614
```
1715

1816
# Contributing

java/maven_install.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"__AUTOGENERATED_FILE_DO_NOT_MODIFY_THIS_FILE_MANUALLY": "THERE_IS_NO_DATA_ONLY_ZUUL",
3-
"__INPUT_ARTIFACTS_HASH": 1132645732,
4-
"__RESOLVED_ARTIFACTS_HASH": 1947623231,
3+
"__INPUT_ARTIFACTS_HASH": 1220324005,
4+
"__RESOLVED_ARTIFACTS_HASH": 1655871984,
55
"artifacts": {
66
"com.beust:jcommander": {
77
"shasums": {
@@ -459,10 +459,10 @@
459459
},
460460
"net.bytebuddy:byte-buddy-agent": {
461461
"shasums": {
462-
"jar": "1d76defd159a564b9cb7a968d0dea27367b8b70ebde75a968e7ef1921bc75ee4",
463-
"sources": "8a7e537a5c2a932a6d73dcec9aa8d5388d33ab3aa91ea410aeea5228dcfe9745"
462+
"jar": "316d2c0795c2a4d4c4756f2e6f9349837c7430ac34e0477ead874d05f5cc19e5",
463+
"sources": "a73d2869afd79b63396a0a07ac037bbfa184eb7306916343c030feb5335ac940"
464464
},
465-
"version": "1.15.4"
465+
"version": "1.15.11"
466466
},
467467
"net.sf.saxon:Saxon-HE": {
468468
"shasums": {
@@ -676,10 +676,10 @@
676676
},
677677
"org.mockito:mockito-core": {
678678
"shasums": {
679-
"jar": "2296141c1e1f2e1ae35c08d36a9ab4563ecd66e03533fe82630a764e7aa49182",
680-
"sources": "32f318184ab3795885743f23d8be0da7fe856e3e360b518083f8b366a44d2b33"
679+
"jar": "bf48b7372d9491d5ec8aebb4cdd187d15663931599c0fbe7410166ce0e1e58ff",
680+
"sources": "bc0ee4bc1d8d43a9bd5e5b49dc479566c28db0740284524140aa264e57e8e27e"
681681
},
682-
"version": "5.14.2"
682+
"version": "5.15.2"
683683
},
684684
"org.objenesis:objenesis": {
685685
"shasums": {

java/src/org/openqa/selenium/Cookie.java

Lines changed: 39 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,21 @@
2424
import java.util.Objects;
2525
import java.util.TimeZone;
2626
import java.util.TreeMap;
27+
import org.jspecify.annotations.NullMarked;
28+
import org.jspecify.annotations.Nullable;
2729

30+
@NullMarked
2831
public class Cookie implements Serializable {
2932
private static final long serialVersionUID = 4115876353625612383L;
3033

3134
private final String name;
3235
private final String value;
3336
private final String path;
34-
private final String domain;
35-
private final Date expiry;
37+
private final @Nullable String domain;
38+
private final @Nullable Date expiry;
3639
private final boolean isSecure;
3740
private final boolean isHttpOnly;
38-
private final String sameSite;
41+
private final @Nullable String sameSite;
3942

4043
/**
4144
* Creates an insecure non-httpOnly cookie with no domain specified.
@@ -47,7 +50,7 @@ public class Cookie implements Serializable {
4750
* @param expiry The cookie's expiration date; may be null.
4851
* @see #Cookie(String, String, String, String, Date)
4952
*/
50-
public Cookie(String name, String value, String path, Date expiry) {
53+
public Cookie(String name, String value, @Nullable String path, @Nullable Date expiry) {
5154
this(name, value, null, path, expiry);
5255
}
5356

@@ -62,7 +65,12 @@ public Cookie(String name, String value, String path, Date expiry) {
6265
* @param expiry The cookie's expiration date; may be null.
6366
* @see #Cookie(String, String, String, String, Date, boolean)
6467
*/
65-
public Cookie(String name, String value, String domain, String path, Date expiry) {
68+
public Cookie(
69+
String name,
70+
String value,
71+
@Nullable String domain,
72+
@Nullable String path,
73+
@Nullable Date expiry) {
6674
this(name, value, domain, path, expiry, false);
6775
}
6876

@@ -78,7 +86,12 @@ public Cookie(String name, String value, String domain, String path, Date expiry
7886
* @param isSecure Whether this cookie requires a secure connection.
7987
*/
8088
public Cookie(
81-
String name, String value, String domain, String path, Date expiry, boolean isSecure) {
89+
String name,
90+
String value,
91+
@Nullable String domain,
92+
@Nullable String path,
93+
@Nullable Date expiry,
94+
boolean isSecure) {
8295
this(name, value, domain, path, expiry, isSecure, false);
8396
}
8497

@@ -97,9 +110,9 @@ public Cookie(
97110
public Cookie(
98111
String name,
99112
String value,
100-
String domain,
101-
String path,
102-
Date expiry,
113+
@Nullable String domain,
114+
@Nullable String path,
115+
@Nullable Date expiry,
103116
boolean isSecure,
104117
boolean isHttpOnly) {
105118
this(name, value, domain, path, expiry, isSecure, isHttpOnly, null);
@@ -121,12 +134,12 @@ public Cookie(
121134
public Cookie(
122135
String name,
123136
String value,
124-
String domain,
125-
String path,
126-
Date expiry,
137+
@Nullable String domain,
138+
@Nullable String path,
139+
@Nullable Date expiry,
127140
boolean isSecure,
128141
boolean isHttpOnly,
129-
String sameSite) {
142+
@Nullable String sameSite) {
130143
this.name = name;
131144
this.value = value;
132145
this.path = path == null || path.isEmpty() ? "/" : path;
@@ -174,7 +187,7 @@ public String getValue() {
174187
return value;
175188
}
176189

177-
public String getDomain() {
190+
public @Nullable String getDomain() {
178191
return domain;
179192
}
180193

@@ -190,15 +203,15 @@ public boolean isHttpOnly() {
190203
return isHttpOnly;
191204
}
192205

193-
public Date getExpiry() {
206+
public @Nullable Date getExpiry() {
194207
return expiry == null ? null : new Date(expiry.getTime());
195208
}
196209

197-
public String getSameSite() {
210+
public @Nullable String getSameSite() {
198211
return sameSite;
199212
}
200213

201-
private static String stripPort(String domain) {
214+
private static @Nullable String stripPort(@Nullable String domain) {
202215
return (domain == null) ? null : domain.split(":")[0];
203216
}
204217

@@ -270,7 +283,7 @@ public String toString() {
270283

271284
/** Two cookies are equal if the name and value match */
272285
@Override
273-
public boolean equals(Object o) {
286+
public boolean equals(@Nullable Object o) {
274287
if (this == o) {
275288
return true;
276289
}
@@ -295,29 +308,29 @@ public static class Builder {
295308

296309
private final String name;
297310
private final String value;
298-
private String path;
299-
private String domain;
300-
private Date expiry;
311+
private @Nullable String path;
312+
private @Nullable String domain;
313+
private @Nullable Date expiry;
301314
private boolean secure;
302315
private boolean httpOnly;
303-
private String sameSite;
316+
private @Nullable String sameSite;
304317

305318
public Builder(String name, String value) {
306319
this.name = name;
307320
this.value = value;
308321
}
309322

310-
public Builder domain(String host) {
323+
public Builder domain(@Nullable String host) {
311324
this.domain = stripPort(host);
312325
return this;
313326
}
314327

315-
public Builder path(String path) {
328+
public Builder path(@Nullable String path) {
316329
this.path = path;
317330
return this;
318331
}
319332

320-
public Builder expiresOn(Date expiry) {
333+
public Builder expiresOn(@Nullable Date expiry) {
321334
this.expiry = expiry == null ? null : new Date(expiry.getTime());
322335
return this;
323336
}
@@ -332,7 +345,7 @@ public Builder isHttpOnly(boolean httpOnly) {
332345
return this;
333346
}
334347

335-
public Builder sameSite(String sameSite) {
348+
public Builder sameSite(@Nullable String sameSite) {
336349
this.sameSite = sameSite;
337350
return this;
338351
}

0 commit comments

Comments
 (0)