Skip to content

Commit 53a20ad

Browse files
committed
[.NET] Make DriverService InitializationTimeout property public
Also allow the property to be settable. Fixes issue #9150.
1 parent 49455d0 commit 53a20ad

File tree

3 files changed

+12
-16
lines changed

3 files changed

+12
-16
lines changed

dotnet/CHANGELOG

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ v4.0.0b2
66
Nightly. To use this feature, set the EnableDevToolsProtocol property of
77
FirefoxOptions to true.
88
* Fixed network interception for use with browsers that support CDP.
9+
* Made DriverService.InitializationTimeout a public settable property. Fixes
10+
issue #9150.
911

1012
v4.0.0b1
1113
========

dotnet/src/webdriver/DriverService.cs

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ public abstract class DriverService : ICommandServer
4040
private bool hideCommandPromptWindow;
4141
private bool isDisposed;
4242
private Process driverServiceProcess;
43+
private TimeSpan initializationTimeout = TimeSpan.FromSeconds(20);
4344

4445
/// <summary>
4546
/// Initializes a new instance of the <see cref="DriverService"/> class.
@@ -166,6 +167,15 @@ public int ProcessId
166167
}
167168
}
168169

170+
/// <summary>
171+
/// Gets or sets a value indicating the time to wait for an initial connection before timing out.
172+
/// </summary>
173+
public TimeSpan InitializationTimeout
174+
{
175+
get { return this.initializationTimeout; }
176+
set { this.initializationTimeout = value; }
177+
}
178+
169179
/// <summary>
170180
/// Gets the executable file name of the driver service.
171181
/// </summary>
@@ -182,14 +192,6 @@ protected virtual string CommandLineArguments
182192
get { return string.Format(CultureInfo.InvariantCulture, "--port={0}", this.driverServicePort); }
183193
}
184194

185-
/// <summary>
186-
/// Gets a value indicating the time to wait for an initial connection before timing out.
187-
/// </summary>
188-
protected virtual TimeSpan InitializationTimeout
189-
{
190-
get { return TimeSpan.FromSeconds(20); }
191-
}
192-
193195
/// <summary>
194196
/// Gets a value indicating the time to wait for the service to terminate before forcing it to terminate.
195197
/// </summary>

dotnet/src/webdriver/Firefox/FirefoxDriverService.cs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -124,14 +124,6 @@ public FirefoxDriverLogLevel LogLevel
124124
set { this.loggingLevel = value; }
125125
}
126126

127-
/// <summary>
128-
/// Gets a value indicating the time to wait for an initial connection before timing out.
129-
/// </summary>
130-
protected override TimeSpan InitializationTimeout
131-
{
132-
get { return TimeSpan.FromSeconds(2); }
133-
}
134-
135127
/// <summary>
136128
/// Gets a value indicating the time to wait for the service to terminate before forcing it to terminate.
137129
/// </summary>

0 commit comments

Comments
 (0)