Skip to content

Commit 56d3e03

Browse files
Merge branch 'trunk' into input-device
2 parents 2432a51 + dd8c914 commit 56d3e03

Some content is hidden

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

46 files changed

+581
-444
lines changed

MODULE.bazel

Lines changed: 31 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ bazel_dep(name = "rules_cc", version = "0.0.9", dev_dependency = True)
1919

2020
bazel_dep(name = "rules_dotnet", version = "0.16.1")
2121
bazel_dep(name = "rules_java", version = "7.11.1")
22-
bazel_dep(name = "rules_jvm_external", version = "6.3")
22+
bazel_dep(name = "rules_jvm_external", version = "6.6")
2323
bazel_dep(name = "rules_nodejs", version = "6.3.0")
2424
bazel_dep(name = "rules_oci", version = "1.7.6")
2525
bazel_dep(name = "rules_pkg", version = "0.10.1")
@@ -182,23 +182,23 @@ maven.install(
182182
"dev.failsafe:failsafe:3.3.2",
183183
"io.grpc:grpc-context:1.68.1",
184184
"io.lettuce:lettuce-core:6.5.0.RELEASE",
185-
"io.netty:netty-buffer:4.1.115.Final",
186-
"io.netty:netty-codec-http:4.1.115.Final",
187-
"io.netty:netty-codec-http2:4.1.115.Final",
188-
"io.netty:netty-common:4.1.115.Final",
189-
"io.netty:netty-handler:4.1.115.Final",
190-
"io.netty:netty-handler-proxy:4.1.115.Final",
191-
"io.netty:netty-transport:4.1.115.Final",
192-
"io.opentelemetry:opentelemetry-api:1.44.1",
193-
"io.opentelemetry:opentelemetry-context:1.44.1",
194-
"io.opentelemetry:opentelemetry-exporter-logging:1.44.1",
195-
"io.opentelemetry:opentelemetry-sdk:1.44.1",
196-
"io.opentelemetry:opentelemetry-sdk-common:1.44.1",
197-
"io.opentelemetry:opentelemetry-sdk-extension-autoconfigure:1.44.1",
198-
"io.opentelemetry:opentelemetry-sdk-extension-autoconfigure-spi:1.44.1",
199-
"io.opentelemetry:opentelemetry-sdk-testing:1.44.1",
200-
"io.opentelemetry:opentelemetry-sdk-trace:1.44.1",
201-
"io.opentelemetry.semconv:opentelemetry-semconv:1.25.0-alpha",
185+
"io.netty:netty-buffer",
186+
"io.netty:netty-codec-http",
187+
"io.netty:netty-codec-http2",
188+
"io.netty:netty-common",
189+
"io.netty:netty-handler",
190+
"io.netty:netty-handler-proxy",
191+
"io.netty:netty-transport",
192+
"io.opentelemetry:opentelemetry-api",
193+
"io.opentelemetry:opentelemetry-context",
194+
"io.opentelemetry:opentelemetry-exporter-logging",
195+
"io.opentelemetry:opentelemetry-sdk",
196+
"io.opentelemetry:opentelemetry-sdk-common",
197+
"io.opentelemetry:opentelemetry-sdk-extension-autoconfigure",
198+
"io.opentelemetry:opentelemetry-sdk-extension-autoconfigure-spi",
199+
"io.opentelemetry:opentelemetry-sdk-testing",
200+
"io.opentelemetry:opentelemetry-sdk-trace",
201+
"io.opentelemetry.semconv:opentelemetry-semconv:1.28.0-alpha",
202202
"it.ozimov:embedded-redis:0.7.3",
203203
"net.bytebuddy:byte-buddy:1.15.10",
204204
"org.htmlunit:htmlunit-core-js:4.6.0",
@@ -209,20 +209,25 @@ maven.install(
209209
"org.eclipse.mylyn.github:org.eclipse.egit.github.core:2.1.5",
210210
"org.hsqldb:hsqldb:2.7.4",
211211
"org.jspecify:jspecify:1.0.0",
212-
"org.junit.jupiter:junit-jupiter-api:5.11.3",
213-
"org.junit.jupiter:junit-jupiter-engine:5.11.3",
214-
"org.junit.jupiter:junit-jupiter-params:5.11.3",
215-
"org.junit.platform:junit-platform-launcher:1.11.3",
216-
"org.junit.platform:junit-platform-reporting:1.11.3",
217-
"org.junit.platform:junit-platform-commons:1.11.3",
218-
"org.junit.platform:junit-platform-engine:1.11.3",
212+
"org.junit.jupiter:junit-jupiter-api",
213+
"org.junit.jupiter:junit-jupiter-engine",
214+
"org.junit.jupiter:junit-jupiter-params",
215+
"org.junit.platform:junit-platform-launcher",
216+
"org.junit.platform:junit-platform-reporting",
217+
"org.junit.platform:junit-platform-commons",
218+
"org.junit.platform:junit-platform-engine",
219219
"org.mockito:mockito-core:5.14.2",
220220
"org.redisson:redisson:3.39.0",
221221
"org.slf4j:slf4j-api:2.0.16",
222222
"org.slf4j:slf4j-jdk14:2.0.16",
223223
"org.tomlj:tomlj:1.1.1",
224224
"org.zeromq:jeromq:0.6.0",
225225
],
226+
boms = [
227+
"io.opentelemetry:opentelemetry-bom:1.44.1",
228+
"io.netty:netty-bom:4.1.115.Final",
229+
"org.junit:junit-bom:5.11.3",
230+
],
226231
excluded_artifacts = [
227232
"org.hamcrest:hamcrest-all", # Replaced by hamcrest 2
228233
"org.hamcrest:hamcrest-core",
@@ -235,6 +240,7 @@ maven.install(
235240
repositories = [
236241
"https://repo1.maven.org/maven2",
237242
],
243+
resolver = "maven",
238244
strict_visibility = True,
239245
)
240246
use_repo(maven, "maven", "unpinned_maven")

common/mirror/selenium

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
11
[
22
{
3-
"tag_name": "selenium-4.27.0",
3+
"tag_name": "nightly",
44
"assets": [
55
{
6-
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.27.0/selenium-dotnet-4.27.0.zip"
7-
},
8-
{
9-
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.27.0/selenium-dotnet-strongnamed-4.27.0.zip"
10-
},
11-
{
12-
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.27.0/selenium-java-4.27.0.zip"
6+
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/nightly/selenium-java-4.28.0-SNAPSHOT.zip"
137
},
148
{
15-
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.27.0/selenium-server-4.27.0.jar"
9+
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/nightly/selenium-server-4.28.0-SNAPSHOT.jar"
1610
},
1711
{
18-
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.27.0/selenium-server-4.27.0.zip"
12+
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/nightly/selenium-server-4.28.0-SNAPSHOT.zip"
1913
}
2014
]
2115
},
2216
{
23-
"tag_name": "nightly",
17+
"tag_name": "selenium-4.27.0",
2418
"assets": [
2519
{
26-
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/nightly/selenium-java-4.28.0-SNAPSHOT.zip"
20+
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.27.0/selenium-dotnet-4.27.0.zip"
2721
},
2822
{
29-
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/nightly/selenium-server-4.28.0-SNAPSHOT.jar"
23+
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.27.0/selenium-dotnet-strongnamed-4.27.0.zip"
3024
},
3125
{
32-
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/nightly/selenium-server-4.28.0-SNAPSHOT.zip"
26+
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.27.0/selenium-java-4.27.0.zip"
27+
},
28+
{
29+
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.27.0/selenium-server-4.27.0.jar"
30+
},
31+
{
32+
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.27.0/selenium-server-4.27.0.zip"
3333
}
3434
]
3535
},

dotnet/src/webdriver/Chromium/ChromiumDriverService.cs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ protected static string ChromiumDriverServiceFileName(string fileName = DefaultC
208208
// straightforward as you might hope.
209209
// See: http://mono.wikia.com/wiki/Detecting_the_execution_platform
210210
// and https://msdn.microsoft.com/en-us/library/3a8hyw88(v=vs.110).aspx
211-
const int PlatformMonoUnixValue = 128;
211+
const PlatformID PlatformIDMonoUnix = (PlatformID)128;
212212

213213
switch (Environment.OSVersion.Platform)
214214
{
@@ -221,17 +221,14 @@ protected static string ChromiumDriverServiceFileName(string fileName = DefaultC
221221

222222
case PlatformID.MacOSX:
223223
case PlatformID.Unix:
224+
case PlatformIDMonoUnix:
224225
break;
225226

226227
// Don't handle the Xbox case. Let default handle it.
227228
// case PlatformID.Xbox:
228229
// break;
229-
default:
230-
if ((int)Environment.OSVersion.Platform == PlatformMonoUnixValue)
231-
{
232-
break;
233-
}
234230

231+
default:
235232
throw new WebDriverException("Unsupported platform: " + Environment.OSVersion.Platform);
236233
}
237234

dotnet/src/webdriver/Firefox/FirefoxDriverService.cs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ private static string FirefoxDriverServiceFileName()
263263
// straightforward as you might hope.
264264
// See: http://mono.wikia.com/wiki/Detecting_the_execution_platform
265265
// and https://msdn.microsoft.com/en-us/library/3a8hyw88(v=vs.110).aspx
266-
const int PlatformMonoUnixValue = 128;
266+
const PlatformID PlatformIDMonoUnix = (PlatformID)128;
267267

268268
switch (Environment.OSVersion.Platform)
269269
{
@@ -276,17 +276,13 @@ private static string FirefoxDriverServiceFileName()
276276

277277
case PlatformID.MacOSX:
278278
case PlatformID.Unix:
279+
case PlatformIDMonoUnix:
279280
break;
280281

281282
// Don't handle the Xbox case. Let default handle it.
282283
// case PlatformID.Xbox:
283284
// break;
284285
default:
285-
if ((int)Environment.OSVersion.Platform == PlatformMonoUnixValue)
286-
{
287-
break;
288-
}
289-
290286
throw new WebDriverException("Unsupported platform: " + Environment.OSVersion.Platform);
291287
}
292288

dotnet/src/webdriver/ICapabilities.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919

2020
using System;
2121

22+
#nullable enable
23+
2224
namespace OpenQA.Selenium
2325
{
2426
/// <summary>
@@ -49,6 +51,6 @@ public interface ICapabilities
4951
/// <param name="capability">The capability to get.</param>
5052
/// <returns>An object associated with the capability, or <see langword="null"/>
5153
/// if the capability is not set on the browser.</returns>
52-
object GetCapability(string capability);
54+
object? GetCapability(string capability);
5355
}
5456
}

dotnet/src/webdriver/ISearchContext.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
using System;
2121
using System.Collections.ObjectModel;
2222

23+
#nullable enable
24+
2325
namespace OpenQA.Selenium
2426
{
2527
/// <summary>

dotnet/src/webdriver/IWrapsDriver.cs

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

20+
#nullable enable
21+
2022
namespace OpenQA.Selenium
2123
{
2224
/// <summary>

dotnet/src/webdriver/Internal/AndroidOptions.cs

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -19,55 +19,43 @@
1919

2020
using System;
2121

22+
#nullable enable
23+
2224
namespace OpenQA.Selenium.Internal
2325
{
2426
/// <summary>
2527
/// Provides a base class for options for browsers to be automated on Android.
2628
/// </summary>
2729
public class AndroidOptions
2830
{
29-
private string androidPackage;
30-
private string androidDeviceSerial;
31-
private string androidActivity;
32-
3331
/// <summary>
3432
/// Initializes a new instance of the <see cref="AndroidOptions"/> class.
3533
/// </summary>
3634
/// <param name="androidPackage"></param>
35+
/// <exception cref="ArgumentException">If <paramref name="androidPackage"/> is <see langword="null"/> or <see cref="string.Empty"/>.</exception>
3736
protected AndroidOptions(string androidPackage)
3837
{
3938
if (string.IsNullOrEmpty(androidPackage))
4039
{
4140
throw new ArgumentException("The Android package cannot be null or the empty string", nameof(androidPackage));
4241
}
4342

44-
this.androidPackage = androidPackage;
43+
this.AndroidPackage = androidPackage;
4544
}
4645

4746
/// <summary>
4847
/// The package name of the application to automate.
4948
/// </summary>
50-
public string AndroidPackage
51-
{
52-
get { return this.androidPackage; }
53-
}
49+
public string AndroidPackage { get; }
5450

5551
/// <summary>
5652
/// The serial number of the device on which to launch the application.
5753
/// </summary>
58-
public string AndroidDeviceSerial
59-
{
60-
get { return this.androidDeviceSerial; }
61-
set { this.androidDeviceSerial = value; }
62-
}
54+
public string? AndroidDeviceSerial { get; set; }
6355

6456
/// <summary>
6557
/// Gets or sets the name of the Activity hosting the app.
6658
/// </summary>
67-
public string AndroidActivity
68-
{
69-
get { return this.androidActivity; }
70-
set { this.androidActivity = value; }
71-
}
59+
public string? AndroidActivity { get; set; }
7260
}
7361
}

dotnet/src/webdriver/Internal/Base64UrlEncoder.cs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,17 @@
1919

2020
using System;
2121

22+
#nullable enable
23+
2224
namespace OpenQA.Selenium.Internal
2325
{
26+
/*
27+
* Based on: https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/blob/6.19.0/src/Microsoft.IdentityModel.Tokens/Base64UrlEncoder.cs
28+
*
29+
* Now it is a part of .NET 9+ as System.Buffers.Text.Base64Url
30+
* https://github.com/SeleniumHQ/selenium/issues/14813
31+
*/
32+
2433
/// <summary>
2534
/// Encodes and Decodes strings as Base64Url encoding.
2635
/// </summary>
@@ -45,8 +54,6 @@ public static class Base64UrlEncoder
4554
base64UrlCharacter63
4655
};
4756

48-
// https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/blob/6.19.0/src/Microsoft.IdentityModel.Tokens/Base64UrlEncoder.cs#L85
49-
5057
/// <summary>
5158
/// Converts a subset of an array of 8-bit unsigned integers to its equivalent string representation which is encoded with base-64-url digits.
5259
/// </summary>
@@ -115,8 +122,6 @@ public static string Encode(byte[] inArray)
115122
return new string(output, 0, j);
116123
}
117124

118-
// https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/blob/6.19.0/src/Microsoft.IdentityModel.Tokens/Base64UrlEncoder.cs#L179
119-
120125
/// <summary>
121126
/// Converts the specified string, which encodes binary data as base-64-url digits, to an equivalent 8-bit unsigned integer array.</summary>
122127
/// <param name="str">base64Url encoded string.</param>

dotnet/src/webdriver/Internal/FileUtilities.cs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
using System.IO;
2424
using System.Reflection;
2525

26+
#nullable enable
27+
2628
namespace OpenQA.Selenium.Internal
2729
{
2830
/// <summary>
@@ -40,7 +42,7 @@ internal static class FileUtilities
4042
/// <returns><see langword="true"/> if the copy is completed; otherwise <see langword="false"/>.</returns>
4143
public static bool CopyDirectory(string sourceDirectory, string destinationDirectory)
4244
{
43-
bool copyComplete = false;
45+
bool copyComplete;
4446
DirectoryInfo sourceDirectoryInfo = new DirectoryInfo(sourceDirectory);
4547
DirectoryInfo destinationDirectoryInfo = new DirectoryInfo(destinationDirectory);
4648

@@ -132,7 +134,7 @@ public static string FindFile(string fileName)
132134

133135
// If it's not in the same directory as the executing assembly,
134136
// try looking in the system path.
135-
string systemPath = Environment.GetEnvironmentVariable("PATH");
137+
string? systemPath = Environment.GetEnvironmentVariable("PATH");
136138
if (!string.IsNullOrEmpty(systemPath))
137139
{
138140
string expandedPath = Environment.ExpandEnvironmentVariables(systemPath);
@@ -165,7 +167,7 @@ public static string FindFile(string fileName)
165167
public static string GetCurrentDirectory()
166168
{
167169
Assembly executingAssembly = typeof(FileUtilities).Assembly;
168-
string location = null;
170+
string? location = null;
169171

170172
// Make sure not to call Path.GetDirectoryName if assembly location is null or empty
171173
if (!string.IsNullOrEmpty(executingAssembly.Location))
@@ -184,13 +186,13 @@ public static string GetCurrentDirectory()
184186
location = Directory.GetCurrentDirectory();
185187
}
186188

187-
string currentDirectory = location;
189+
string currentDirectory = location!;
188190

189191
// If we're shadow copying, get the directory from the codebase instead
190192
if (AppDomain.CurrentDomain.ShadowCopyFiles)
191193
{
192194
Uri uri = new Uri(executingAssembly.CodeBase);
193-
currentDirectory = Path.GetDirectoryName(uri.LocalPath);
195+
currentDirectory = Path.GetDirectoryName(uri.LocalPath)!;
194196
}
195197

196198
return currentDirectory;

0 commit comments

Comments
 (0)