Skip to content

Commit 700e529

Browse files
authored
Merge branch 'trunk' into feat/configurable-timeout-for-devtools-commands
2 parents aafdb81 + fc463fd commit 700e529

File tree

80 files changed

+1568
-1218
lines changed

Some content is hidden

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

80 files changed

+1568
-1218
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/support/BUILD.bazel

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ csharp_library(
3535
"UI/*.cs",
3636
]) + [":assembly-info"],
3737
out = "WebDriver.Support",
38+
langversion = "12.0",
39+
nullable = "annotations",
3840
target_frameworks = [
3941
"netstandard2.0",
4042
],
@@ -74,6 +76,8 @@ csharp_library(
7476
]) + [":assembly-info"],
7577
out = "WebDriver.Support.StrongNamed",
7678
keyfile = "//dotnet:WebDriver.snk",
79+
langversion = "12.0",
80+
nullable = "annotations",
7781
target_frameworks = [
7882
"netstandard2.0",
7983
],

dotnet/src/support/Events/FindElementEventArgs.cs

Lines changed: 12 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,12 @@ namespace OpenQA.Selenium.Support.Events
2626
/// </summary>
2727
public class FindElementEventArgs : EventArgs
2828
{
29-
private IWebDriver driver;
30-
private IWebElement element;
31-
private By method;
32-
3329
/// <summary>
3430
/// Initializes a new instance of the <see cref="FindElementEventArgs"/> class.
3531
/// </summary>
3632
/// <param name="driver">The WebDriver instance used in finding elements.</param>
37-
/// <param name="method">The <see cref="By"/> object containing the method used to find elements</param>
33+
/// <param name="method">The <see cref="By"/> object containing the method used to find elements.</param>
34+
/// <exception cref="ArgumentNullException">If <paramref name="driver"/> or <paramref name="method"/> are <see langword="null"/>.</exception>
3835
public FindElementEventArgs(IWebDriver driver, By method)
3936
: this(driver, null, method)
4037
{
@@ -44,37 +41,29 @@ public FindElementEventArgs(IWebDriver driver, By method)
4441
/// Initializes a new instance of the <see cref="FindElementEventArgs"/> class.
4542
/// </summary>
4643
/// <param name="driver">The WebDriver instance used in finding elements.</param>
47-
/// <param name="element">The parent element used as the context for the search.</param>
44+
/// <param name="element">The parent element used as the context for the search, or <see langword="null"/> if none exists.</param>
4845
/// <param name="method">The <see cref="By"/> object containing the method used to find elements.</param>
49-
public FindElementEventArgs(IWebDriver driver, IWebElement element, By method)
46+
/// <exception cref="ArgumentNullException">If <paramref name="driver"/> or <paramref name="method"/> are <see langword="null"/>.</exception>
47+
public FindElementEventArgs(IWebDriver driver, IWebElement? element, By method)
5048
{
51-
this.driver = driver;
52-
this.element = element;
53-
this.method = method;
49+
this.Driver = driver ?? throw new ArgumentNullException(nameof(driver));
50+
this.Element = element;
51+
this.FindMethod = method ?? throw new ArgumentNullException(nameof(method));
5452
}
5553

5654
/// <summary>
5755
/// Gets the WebDriver instance used in finding elements.
5856
/// </summary>
59-
public IWebDriver Driver
60-
{
61-
get { return this.driver; }
62-
}
57+
public IWebDriver Driver { get; }
6358

6459
/// <summary>
65-
/// Gets the parent element used as the context for the search.
60+
/// Gets the parent element used as the context for the search, or <see langword="null"/> if no element is associated.
6661
/// </summary>
67-
public IWebElement Element
68-
{
69-
get { return this.element; }
70-
}
62+
public IWebElement? Element { get; }
7163

7264
/// <summary>
7365
/// Gets the <see cref="By"/> object containing the method used to find elements.
7466
/// </summary>
75-
public By FindMethod
76-
{
77-
get { return this.method; }
78-
}
67+
public By FindMethod { get; }
7968
}
8069
}

dotnet/src/support/Events/GetShadowRootEventArgs.cs

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,34 +26,26 @@ namespace OpenQA.Selenium.Support.Events
2626
/// </summary>
2727
public class GetShadowRootEventArgs : EventArgs
2828
{
29-
private IWebDriver driver;
30-
private ISearchContext searchContext;
31-
3229
/// <summary>
3330
/// Initializes a new instance of the <see cref="GetShadowRootEventArgs"/> class.
3431
/// </summary>
3532
/// <param name="driver">The WebDriver instance used in the current context.</param>
3633
/// <param name="searchContext">The parent searc context used as the context for getting shadow root.</param>
34+
/// <exception cref="ArgumentNullException">If <paramref name="driver"/> or <paramref name="searchContext"/> are <see langword="null"/>.</exception>
3735
public GetShadowRootEventArgs(IWebDriver driver, ISearchContext searchContext)
3836
{
39-
this.driver = driver;
40-
this.searchContext = searchContext;
37+
this.Driver = driver ?? throw new ArgumentNullException(nameof(driver));
38+
this.SearchContext = searchContext ?? throw new ArgumentNullException(nameof(searchContext));
4139
}
4240

4341
/// <summary>
4442
/// Gets the WebDriver instance used in the current context.
4543
/// </summary>
46-
public IWebDriver Driver
47-
{
48-
get { return this.driver; }
49-
}
44+
public IWebDriver Driver { get; }
5045

5146
/// <summary>
5247
/// Gets the parent search context used as the context for getting shadow root.
5348
/// </summary>
54-
public ISearchContext SearchContext
55-
{
56-
get { return this.searchContext; }
57-
}
49+
public ISearchContext SearchContext { get; }
5850
}
5951
}

dotnet/src/support/Events/WebDriverExceptionEventArgs.cs

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,34 +26,26 @@ namespace OpenQA.Selenium.Support.Events
2626
/// </summary>
2727
public class WebDriverExceptionEventArgs : EventArgs
2828
{
29-
private Exception thrownException;
30-
private IWebDriver driver;
31-
3229
/// <summary>
3330
/// Initializes a new instance of the <see cref="WebDriverExceptionEventArgs"/> class.
3431
/// </summary>
3532
/// <param name="driver">The WebDriver instance throwing the exception.</param>
3633
/// <param name="thrownException">The exception thrown by the driver.</param>
34+
/// <exception cref="ArgumentNullException">If <paramref name="driver"/> or <paramref name="thrownException"/> are <see langword="null"/>.</exception>
3735
public WebDriverExceptionEventArgs(IWebDriver driver, Exception thrownException)
3836
{
39-
this.driver = driver;
40-
this.thrownException = thrownException;
37+
this.Driver = driver ?? throw new ArgumentNullException(nameof(driver));
38+
this.ThrownException = thrownException ?? throw new ArgumentNullException(nameof(thrownException));
4139
}
4240

4341
/// <summary>
4442
/// Gets the exception thrown by the driver.
4543
/// </summary>
46-
public Exception ThrownException
47-
{
48-
get { return this.thrownException; }
49-
}
44+
public Exception ThrownException { get; }
5045

5146
/// <summary>
52-
/// Gets the WebDriver instance .
47+
/// Gets the WebDriver instance.
5348
/// </summary>
54-
public IWebDriver Driver
55-
{
56-
get { return this.driver; }
57-
}
49+
public IWebDriver Driver { get; }
5850
}
5951
}

dotnet/src/support/Events/WebDriverNavigationEventArgs.cs

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,11 @@ namespace OpenQA.Selenium.Support.Events
2626
/// </summary>
2727
public class WebDriverNavigationEventArgs : EventArgs
2828
{
29-
private string url;
30-
private IWebDriver driver;
31-
3229
/// <summary>
3330
/// Initializes a new instance of the <see cref="WebDriverNavigationEventArgs"/> class.
3431
/// </summary>
3532
/// <param name="driver">The WebDriver instance used in navigation.</param>
33+
/// <exception cref="ArgumentNullException">If <paramref name="driver"/> is <see langword="null"/>.</exception>
3634
public WebDriverNavigationEventArgs(IWebDriver driver)
3735
: this(driver, null)
3836
{
@@ -42,27 +40,22 @@ public WebDriverNavigationEventArgs(IWebDriver driver)
4240
/// Initializes a new instance of the <see cref="WebDriverNavigationEventArgs"/> class.
4341
/// </summary>
4442
/// <param name="driver">The WebDriver instance used in navigation.</param>
45-
/// <param name="url">The URL navigated to by the driver.</param>
46-
public WebDriverNavigationEventArgs(IWebDriver driver, string url)
43+
/// <param name="url">The URL navigated to by the driver, or <see langword="null"/> if none exists.</param>
44+
/// <exception cref="ArgumentNullException">If <paramref name="driver"/> is <see langword="null"/>.</exception>
45+
public WebDriverNavigationEventArgs(IWebDriver driver, string? url)
4746
{
48-
this.url = url;
49-
this.driver = driver;
47+
this.Url = url;
48+
this.Driver = driver ?? throw new ArgumentNullException(nameof(driver));
5049
}
5150

5251
/// <summary>
53-
/// Gets the URL navigated to by the driver.
52+
/// Gets the URL navigated to by the driver, or <see langword="null"/> if no URL could be determined.
5453
/// </summary>
55-
public string Url
56-
{
57-
get { return this.url; }
58-
}
54+
public string? Url { get; }
5955

6056
/// <summary>
6157
/// Gets the WebDriver instance used in navigation.
6258
/// </summary>
63-
public IWebDriver Driver
64-
{
65-
get { return this.driver; }
66-
}
59+
public IWebDriver Driver { get; }
6760
}
6861
}

dotnet/src/support/Events/WebDriverScriptEventArgs.cs

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,34 +26,26 @@ namespace OpenQA.Selenium.Support.Events
2626
/// </summary>
2727
public class WebDriverScriptEventArgs : EventArgs
2828
{
29-
private IWebDriver driver;
30-
private string script;
31-
3229
/// <summary>
3330
/// Initializes a new instance of the <see cref="WebDriverScriptEventArgs"/> class.
3431
/// </summary>
3532
/// <param name="driver">The WebDriver instance used to execute the script.</param>
3633
/// <param name="script">The script executed by the driver.</param>
34+
/// <exception cref="ArgumentNullException">If <paramref name="driver"/> or <paramref name="script"/> are <see langword="null"/>.</exception>
3735
public WebDriverScriptEventArgs(IWebDriver driver, string script)
3836
{
39-
this.driver = driver;
40-
this.script = script;
37+
this.Driver = driver ?? throw new ArgumentNullException(nameof(driver));
38+
this.Script = script ?? throw new ArgumentNullException(nameof(script));
4139
}
4240

4341
/// <summary>
4442
/// Gets the WebDriver instance used to execute the script.
4543
/// </summary>
46-
public IWebDriver Driver
47-
{
48-
get { return this.driver; }
49-
}
44+
public IWebDriver Driver { get; }
5045

5146
/// <summary>
5247
/// Gets the script executed by the driver.
5348
/// </summary>
54-
public string Script
55-
{
56-
get { return this.script; }
57-
}
49+
public string Script { get; }
5850
}
5951
}

0 commit comments

Comments
 (0)