Skip to content

Commit dfb5446

Browse files
yizengjimevans
authored andcommitted
Add constructor overload which takes in single DriverService parameter
This pattern was already implemented in PhantomJSDriver, but not yet in ChromeDriver and InternetExplorerDriver. Signed-off-by: Jim Evans <[email protected]>
1 parent 9b4ec3b commit dfb5446

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

Diff for: dotnet/src/webdriver/Chrome/ChromeDriver.cs

+9
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,15 @@ public ChromeDriver(ChromeOptions options)
8282
{
8383
}
8484

85+
/// <summary>
86+
/// Initializes a new instance of the <see cref="ChromeDriver"/> class using the specified driver service.
87+
/// </summary>
88+
/// <param name="service">The <see cref="ChromeDriverService"/> used to initialize the driver.</param>
89+
public ChromeDriver(ChromeDriverService service)
90+
: this(service, new ChromeOptions())
91+
{
92+
}
93+
8594
/// <summary>
8695
/// Initializes a new instance of the <see cref="ChromeDriver"/> class using the specified path
8796
/// to the directory containing ChromeDriver.exe.

Diff for: dotnet/src/webdriver/IE/InternetExplorerDriver.cs

+9
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,15 @@ public InternetExplorerDriver(InternetExplorerOptions options)
8585
{
8686
}
8787

88+
/// <summary>
89+
/// Initializes a new instance of the <see cref="InternetExplorerDriver"/> class using the specified driver service.
90+
/// </summary>
91+
/// <param name="service">The <see cref="InternetExplorerDriverService"/> used to initialize the driver.</param>
92+
public InternetExplorerDriver(InternetExplorerDriverService service)
93+
: this(service, new InternetExplorerOptions())
94+
{
95+
}
96+
8897
/// <summary>
8998
/// Initializes a new instance of the <see cref="InternetExplorerDriver"/> class using the specified path
9099
/// to the directory containing IEDriverServer.exe.

0 commit comments

Comments
 (0)