Skip to content

Commit f7f0d9d

Browse files
authored
Merge branch 'trunk' into js-bidi-permissions-module
2 parents f516bf5 + 5ca1cc0 commit f7f0d9d

Some content is hidden

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

41 files changed

+302
-583
lines changed

common/geckodriver/geckodriver-support.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
{
22
"geckodriver-releases": [
3+
{
4+
"geckodriver-version": "0.36.0",
5+
"min-firefox-version": 115
6+
},
37
{
48
"geckodriver-version": "0.35.0",
59
"min-firefox-version": 115

dotnet/src/support/UI/PopupWindowFinder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ public string Invoke(Action popupMethod)
131131

132132
ReadOnlyCollection<string> existingHandles = this.driver.WindowHandles;
133133
popupMethod();
134-
WebDriverWait wait = new WebDriverWait(new SystemClock(), this.driver, this.timeout, this.sleepInterval);
134+
WebDriverWait wait = new WebDriverWait(SystemClock.Instance, this.driver, this.timeout, this.sleepInterval);
135135
string popupHandle = wait.Until<string>((d) =>
136136
{
137137
string? foundHandle = null;

dotnet/src/support/UI/SlowLoadableComponent{T}.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public abstract class SlowLoadableComponent<T> : LoadableComponent<T>
4343
/// </summary>
4444
/// <param name="timeout">The <see cref="TimeSpan"/> within which the component should be loaded.</param>
4545
protected SlowLoadableComponent(TimeSpan timeout)
46-
: this(timeout, new SystemClock())
46+
: this(timeout, SystemClock.Instance)
4747
{
4848
}
4949

dotnet/src/webdriver/Chrome/ChromeDriverService.cs

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,20 +63,22 @@ public static ChromeDriverService CreateDefaultService()
6363
/// </summary>
6464
/// <param name="driverPath">The path to the executable or the directory containing the ChromeDriver executable.</param>
6565
/// <returns>A ChromeDriverService using a random port.</returns>
66-
public static ChromeDriverService CreateDefaultService(string driverPath)
66+
public static ChromeDriverService CreateDefaultService(string? driverPath)
6767
{
68-
string fileName;
6968
if (File.Exists(driverPath))
7069
{
71-
fileName = Path.GetFileName(driverPath);
72-
driverPath = Path.GetDirectoryName(driverPath)!;
70+
string fileName = Path.GetFileName(driverPath);
71+
string driverFolder = Path.GetDirectoryName(driverPath)!;
72+
73+
return CreateDefaultService(driverFolder, fileName);
7374
}
7475
else
7576
{
76-
fileName = ChromiumDriverServiceFileName(DefaultChromeDriverServiceExecutableName);
77-
}
77+
string fileName = ChromiumDriverServiceFileName(DefaultChromeDriverServiceExecutableName);
78+
string? driverFolder = driverPath;
7879

79-
return CreateDefaultService(driverPath, fileName);
80+
return CreateDefaultService(driverFolder, fileName);
81+
}
8082
}
8183

8284
/// <summary>
@@ -85,7 +87,7 @@ public static ChromeDriverService CreateDefaultService(string driverPath)
8587
/// <param name="driverPath">The directory containing the ChromeDriver executable.</param>
8688
/// <param name="driverExecutableFileName">The name of the ChromeDriver executable file.</param>
8789
/// <returns>A ChromeDriverService using a random port.</returns>
88-
public static ChromeDriverService CreateDefaultService(string driverPath, string driverExecutableFileName)
90+
public static ChromeDriverService CreateDefaultService(string? driverPath, string? driverExecutableFileName)
8991
{
9092
return new ChromeDriverService(driverPath, driverExecutableFileName, PortUtilities.FindFreePort());
9193
}

dotnet/src/webdriver/Chromium/ChromiumOptions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,7 @@ private static void AddAndroidOptions(Dictionary<string, object> chromeOptions,
615615

616616
if (!string.IsNullOrEmpty(androidOptions.AndroidProcess))
617617
{
618-
chromeOptions["androidProcess"] = androidOptions.AndroidProcess;
618+
chromeOptions["androidProcess"] = androidOptions.AndroidProcess!;
619619
}
620620

621621
if (androidOptions.UseRunningApp)

dotnet/src/webdriver/Command.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,12 @@ public Command(string name, string jsonParameters)
5555
/// <param name="sessionId">Session ID the driver is using</param>
5656
/// <param name="name">Name of the command</param>
5757
/// <param name="parameters">Parameters for that command</param>
58+
/// <exception cref="ArgumentNullException">If <paramref name="name"/> is <see langword="null"/>.</exception>
5859
public Command(SessionId? sessionId, string name, Dictionary<string, object>? parameters)
5960
{
6061
this.SessionId = sessionId;
6162
this.Parameters = parameters ?? new Dictionary<string, object>();
62-
this.Name = name;
63+
this.Name = name ?? throw new ArgumentNullException(nameof(name));
6364
}
6465

6566
/// <summary>

dotnet/src/webdriver/CommandInfoRepository.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ public bool IsCommandNameDefined(string commandName)
8787
/// </summary>
8888
/// <param name="commandName">The <see cref="DriverCommand"/> for which to get the information.</param>
8989
/// <returns>The <see cref="HttpCommandInfo"/> for the specified command, or <see langword="null"/> if not found or value is not <typeparamref name="T"/>.</returns>
90+
/// <exception cref="ArgumentNullException">If <paramref name="commandName"/> is <see langword="null"/>.</exception>
9091
public T? GetCommandInfo<T>(string commandName) where T : CommandInfo
9192
{
9293
T? toReturn = default;

dotnet/src/webdriver/Edge/EdgeDriverService.cs

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -72,22 +72,24 @@ public static EdgeDriverService CreateDefaultService()
7272
/// <summary>
7373
/// Creates a default instance of the EdgeDriverService using a specified path to the EdgeDriver executable.
7474
/// </summary>
75-
/// <param name="driverPath">The directory containing the EdgeDriver executable.</param>
75+
/// <param name="driverPath">The path to the executable or the directory containing the EdgeDriver executable.</param>
7676
/// <returns>An EdgeDriverService using a random port.</returns>
77-
public static EdgeDriverService CreateDefaultService(string driverPath)
77+
public static EdgeDriverService CreateDefaultService(string? driverPath)
7878
{
79-
string fileName;
8079
if (File.Exists(driverPath))
8180
{
82-
fileName = Path.GetFileName(driverPath);
83-
driverPath = Path.GetDirectoryName(driverPath)!;
81+
string fileName = Path.GetFileName(driverPath);
82+
string driverFolder = Path.GetDirectoryName(driverPath)!;
83+
84+
return CreateDefaultService(driverFolder, fileName);
8485
}
8586
else
8687
{
87-
fileName = ChromiumDriverServiceFileName(MSEdgeDriverServiceFileName);
88-
}
88+
string fileName = ChromiumDriverServiceFileName(MSEdgeDriverServiceFileName);
89+
string? driverFolder = driverPath;
8990

90-
return CreateDefaultService(driverPath, fileName);
91+
return CreateDefaultService(driverFolder, fileName);
92+
}
9193
}
9294

9395
/// <summary>
@@ -96,7 +98,7 @@ public static EdgeDriverService CreateDefaultService(string driverPath)
9698
/// <param name="driverPath">The directory containing the EdgeDriver executable.</param>
9799
/// <param name="driverExecutableFileName">The name of the EdgeDriver executable file.</param>
98100
/// <returns>A EdgeDriverService using a random port.</returns>
99-
public static EdgeDriverService CreateDefaultService(string driverPath, string driverExecutableFileName)
101+
public static EdgeDriverService CreateDefaultService(string? driverPath, string? driverExecutableFileName)
100102
{
101103
return new EdgeDriverService(driverPath, driverExecutableFileName, PortUtilities.FindFreePort());
102104
}

dotnet/src/webdriver/ElementNotSelectableException.cs

Lines changed: 0 additions & 63 deletions
This file was deleted.

dotnet/src/webdriver/ElementNotVisibleException.cs

Lines changed: 0 additions & 63 deletions
This file was deleted.

0 commit comments

Comments
 (0)