Skip to content

Commit 9d14268

Browse files
authored
Merge branch 'trunk' into py-support-ipv6-only-systems
2 parents 03daf3e + 1e7152c commit 9d14268

File tree

14 files changed

+50
-474
lines changed

14 files changed

+50
-474
lines changed

MODULE.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ bazel_dep(name = "rules_multitool", version = "1.3.0")
2424
bazel_dep(name = "rules_nodejs", version = "6.3.2")
2525
bazel_dep(name = "rules_oci", version = "1.8.0")
2626
bazel_dep(name = "rules_pkg", version = "1.0.1")
27-
bazel_dep(name = "rules_python", version = "1.1.0")
27+
bazel_dep(name = "rules_python", version = "1.5.0")
2828
bazel_dep(name = "rules_proto", version = "7.0.2")
2929
bazel_dep(name = "rules_ruby", version = "0.19.0")
3030

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ you can configure it use Bazel artifacts:
266266
1. Open `rb/` as a main project directory.
267267
2. Run `bundle exec rake update` as necessary to create up-to-date artifacts. If this does not work, run `./go rb:update` from the `selenium` (parent) directory.
268268
3. In <kbd>Settings / Languages & Frameworks / Ruby SDK and Gems</kbd> add new <kbd>Interpreter</kbd> pointing to `../bazel-selenium/external/rules_ruby_dist/dist/bin/ruby`.
269-
4. You should now be able to run and debug any spec. It uses Chrome by default, but you can alter it using environment variables secified in [Ruby Testing](#ruby-2) section below.
269+
4. You should now be able to run and debug any spec. It uses Chrome by default, but you can alter it using environment variables specified in [Ruby Testing](#ruby-2) section below.
270270

271271
### Rust
272272

java/src/org/openqa/selenium/By.java

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
import java.util.Map;
2424
import java.util.Objects;
2525
import java.util.regex.Pattern;
26+
import org.jspecify.annotations.NullMarked;
27+
import org.jspecify.annotations.Nullable;
2628
import org.openqa.selenium.internal.Require;
2729

2830
/**
@@ -40,6 +42,7 @@
4042
* }
4143
* </code></pre>
4244
*/
45+
@NullMarked
4346
public abstract class By {
4447
/**
4548
* @param id The value of the "id" attribute to search for.
@@ -158,7 +161,7 @@ protected JavascriptExecutor getJavascriptExecutor(SearchContext context) {
158161
}
159162

160163
@Override
161-
public boolean equals(Object o) {
164+
public boolean equals(@Nullable Object o) {
162165
if (!(o instanceof By)) {
163166
return false;
164167
}
@@ -342,9 +345,9 @@ public interface Remotable {
342345

343346
class Parameters {
344347
private final String using;
345-
private final Object value;
348+
private final @Nullable Object value;
346349

347-
public Parameters(String using, Object value) {
350+
public Parameters(String using, @Nullable Object value) {
348351
this.using = Require.nonNull("Search mechanism", using);
349352
// There may be subclasses where the value is optional. Allow for this.
350353
this.value = value;
@@ -354,7 +357,7 @@ public String using() {
354357
return using;
355358
}
356359

357-
public Object value() {
360+
public @Nullable Object value() {
358361
return value;
359362
}
360363

@@ -364,7 +367,7 @@ public String toString() {
364367
}
365368

366369
@Override
367-
public boolean equals(Object o) {
370+
public boolean equals(@Nullable Object o) {
368371
if (!(o instanceof Parameters)) {
369372
return false;
370373
}
@@ -377,8 +380,8 @@ public int hashCode() {
377380
return Objects.hash(using, value);
378381
}
379382

380-
private Map<String, Object> toJson() {
381-
Map<String, Object> params = new HashMap<>();
383+
private Map<String, @Nullable Object> toJson() {
384+
Map<String, @Nullable Object> params = new HashMap<>();
382385
params.put("using", using);
383386
params.put("value", value);
384387
return Collections.unmodifiableMap(params);
@@ -410,7 +413,7 @@ public final Parameters getRemoteParameters() {
410413
return params;
411414
}
412415

413-
protected final Map<String, Object> toJson() {
416+
protected final Map<String, @Nullable Object> toJson() {
414417
return getRemoteParameters().toJson();
415418
}
416419
}
@@ -441,7 +444,7 @@ public final Parameters getRemoteParameters() {
441444
return remoteParams;
442445
}
443446

444-
protected final Map<String, Object> toJson() {
447+
protected final Map<String, @Nullable Object> toJson() {
445448
return fallback.toJson();
446449
}
447450

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
load("//java:defs.bzl", "java_export", "java_library")
1+
load("//java:defs.bzl", "artifact", "java_export", "java_library")
22
load("//java:version.bzl", "SE_VERSION")
33

44
java_export(
@@ -57,5 +57,6 @@ java_library(
5757
deps = [
5858
"//java/src/org/openqa/selenium:core",
5959
"//java/src/org/openqa/selenium/support/ui:components",
60+
artifact("org.jspecify:jspecify"),
6061
],
6162
)

java/src/org/openqa/selenium/support/ByIdOrName.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,13 @@
2020
import java.io.Serializable;
2121
import java.util.ArrayList;
2222
import java.util.List;
23+
import org.jspecify.annotations.NullMarked;
2324
import org.openqa.selenium.By;
2425
import org.openqa.selenium.NoSuchElementException;
2526
import org.openqa.selenium.SearchContext;
2627
import org.openqa.selenium.WebElement;
2728

29+
@NullMarked
2830
public class ByIdOrName extends By implements Serializable {
2931

3032
private static final long serialVersionUID = 3986638402799576701L;

java/src/org/openqa/selenium/support/pagefactory/ByAll.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import java.io.Serializable;
2121
import java.util.ArrayList;
2222
import java.util.List;
23+
import org.jspecify.annotations.NullMarked;
2324
import org.openqa.selenium.By;
2425
import org.openqa.selenium.NoSuchElementException;
2526
import org.openqa.selenium.SearchContext;
@@ -36,6 +37,7 @@
3637
* will find all elements that match <var>by1</var> and then all elements that match <var>by2</var>.
3738
* This means that the list of elements returned may not be in document order.
3839
*/
40+
@NullMarked
3941
public class ByAll extends By implements Serializable {
4042

4143
private static final long serialVersionUID = 4573668832699497306L;

java/src/org/openqa/selenium/support/pagefactory/ByChained.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import java.util.List;
2323
import java.util.stream.Collectors;
2424
import java.util.stream.Stream;
25+
import org.jspecify.annotations.NullMarked;
2526
import org.openqa.selenium.By;
2627
import org.openqa.selenium.NoSuchElementException;
2728
import org.openqa.selenium.SearchContext;
@@ -38,6 +39,7 @@
3839
* will find all elements that match <var>by2</var> and appear under an element that matches
3940
* <var>by1</var>.
4041
*/
42+
@NullMarked
4143
public class ByChained extends By implements Serializable {
4244

4345
private static final long serialVersionUID = 1563769051170172451L;

py/CHANGES

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,7 @@ Selenium 4.0 Alpha 7
684684
* Add debugpy to requirements
685685
* Fix uploading multiple files on remote driver (#7472) (#8734)
686686
* Correct docstring around find_element and find_elements. Fixes #8806
687-
* Add the ability to ignore local proxys that are available
687+
* Add the ability to ignore local proxies that are available
688688
* add script pinning to python bindings
689689
* Deprecate desired_capabilities property in favour of capabilities property
690690
* Update tests to use requirements file

py/docs/README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ Contributing to Python docs
6666

6767
First it is recommended that you read the main `CONTRIBUTING.md <https://github.com/SeleniumHQ/selenium/blob/trunk/CONTRIBUTING.md>`_.
6868

69-
Some steps for contibuting to the Python documentation ...
69+
Some steps for contributing to the Python documentation ...
7070

7171
- Check out changes locally using instructions above.
7272
- Try to resolve any warnings/errors.

py/selenium/webdriver/common/virtual_authenticator.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def __init__(
9494
- rp_id (str): Relying party identifier.
9595
- user_handle (bytes): userHandle associated to the credential. Must be Base64 encoded string. Can be None.
9696
- private_key (bytes): Base64 encoded PKCS#8 private key.
97-
- sign_count (int): intital value for a signature counter.
97+
- sign_count (int): initial value for a signature counter.
9898
"""
9999
self._id = credential_id
100100
self._is_resident_credential = is_resident_credential
@@ -137,7 +137,7 @@ def create_non_resident_credential(cls, id: bytes, rp_id: str, private_key: byte
137137
- id (bytes): Unique base64 encoded string.
138138
- rp_id (str): Relying party identifier.
139139
- private_key (bytes): Base64 encoded PKCS
140-
- sign_count (int): intital value for a signature counter.
140+
- sign_count (int): initial value for a signature counter.
141141
142142
:Returns:
143143
- Credential: A non-resident credential.
@@ -155,7 +155,7 @@ def create_resident_credential(
155155
- rp_id (str): Relying party identifier.
156156
- user_handle (bytes): userHandle associated to the credential. Must be Base64 encoded string.
157157
- private_key (bytes): Base64 encoded PKCS
158-
- sign_count (int): intital value for a signature counter.
158+
- sign_count (int): initial value for a signature counter.
159159
160160
:returns:
161161
- Credential: A resident credential.

0 commit comments

Comments
 (0)