-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding additional .NET test targets for different browsers
- Loading branch information
Showing
7 changed files
with
197 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
dotnet/test/common/CustomDriverConfigs/DefaultSafariDriver.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
namespace OpenQA.Selenium.Safari | ||
{ | ||
// This is a simple wrapper class to create a SafariDriver that | ||
// uses the technology preview implementation and has no parameters in the | ||
// constructor. | ||
public class DefaultSafariDriver : SafariDriver | ||
{ | ||
public DefaultSafariDriver() | ||
: this(DefaultService, new SafariOptions()) | ||
{ | ||
} | ||
|
||
public DefaultSafariDriver(SafariDriverService service, SafariOptions options) | ||
: base(service, options) | ||
{ | ||
} | ||
|
||
public static SafariDriverService DefaultService | ||
{ | ||
get { return SafariDriverService.CreateDefaultService("/usr/bin"); } | ||
} | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
dotnet/test/common/CustomDriverConfigs/DevChannelChromeDriver.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace OpenQA.Selenium.Chrome | ||
{ | ||
public class DevChannelChromeDriver : ChromeDriver | ||
{ | ||
public DevChannelChromeDriver(ChromeDriverService service) | ||
: this(service, DefaultOptions) | ||
{ | ||
} | ||
|
||
public DevChannelChromeDriver(ChromeDriverService service, ChromeOptions options) | ||
: base(service, options) | ||
{ | ||
} | ||
|
||
public static ChromeOptions DefaultOptions | ||
{ | ||
get { return new ChromeOptions() { BinaryLocation = @"C:\Program Files (x86)\Google\Chrome Dev\Application\chrome.exe" }; } | ||
} | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
dotnet/test/common/CustomDriverConfigs/NightlyFirefoxWebDriver.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using OpenQA.Selenium.Remote; | ||
|
||
namespace OpenQA.Selenium.Firefox | ||
{ | ||
// This is a simple wrapper class to create a FirefoxDriver that | ||
// uses the Marionette implementation and has no parameters in the | ||
// constructor. | ||
public class NightlyFirefoxWebDriver : FirefoxDriver | ||
{ | ||
public NightlyFirefoxWebDriver(FirefoxDriverService service) | ||
: this(service, DefaultOptions) | ||
{ | ||
} | ||
|
||
public NightlyFirefoxWebDriver(FirefoxDriverService service, FirefoxOptions options) | ||
: base(service, options) | ||
{ | ||
} | ||
|
||
public static FirefoxOptions DefaultOptions | ||
{ | ||
get { return new FirefoxOptions() { BrowserExecutableLocation = @"C:\Program Files\Firefox Nightly\firefox.exe", AcceptInsecureCertificates = true }; } | ||
} | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
dotnet/test/common/CustomDriverConfigs/ReleaseFirefoxWebDriver.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using OpenQA.Selenium.Remote; | ||
|
||
namespace OpenQA.Selenium.Firefox | ||
{ | ||
// This is a simple wrapper class to create a FirefoxDriver that | ||
// uses the Marionette implementation and has no parameters in the | ||
// constructor. | ||
public class ReleaseFirefoxWebDriver : FirefoxDriver | ||
{ | ||
public ReleaseFirefoxWebDriver(FirefoxDriverService service) | ||
: this(service, DefaultOptions) | ||
{ | ||
} | ||
|
||
public ReleaseFirefoxWebDriver(FirefoxDriverService service, FirefoxOptions options) | ||
: base(service, options, RemoteWebDriver.DefaultCommandTimeout) | ||
{ | ||
} | ||
|
||
public static FirefoxOptions DefaultOptions | ||
{ | ||
get { return new FirefoxOptions() { BrowserExecutableLocation = @"C:\Program Files\Mozilla Firefox\firefox.exe", AcceptInsecureCertificates = true }; } | ||
} | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
dotnet/test/common/CustomDriverConfigs/SafariTechnologyPreviewDriver.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
namespace OpenQA.Selenium.Safari | ||
{ | ||
// This is a simple wrapper class to create a SafariDriver that | ||
// uses the technology preview implementation and has no parameters in the | ||
// constructor. | ||
public class SafariTechnologyPreviewDriver : SafariDriver | ||
{ | ||
public SafariTechnologyPreviewDriver() | ||
: this(DefaultService, DefaultOptions) | ||
{ | ||
} | ||
|
||
public SafariTechnologyPreviewDriver(SafariDriverService service, SafariOptions options) | ||
: base(service, options) | ||
{ | ||
} | ||
|
||
public static SafariDriverService DefaultService | ||
{ | ||
get { return SafariDriverService.CreateDefaultService("/Applications/Safari Technology Preview.app/Contents/MacOS"); } | ||
} | ||
|
||
public static SafariOptions DefaultOptions | ||
{ | ||
get { return new SafariOptions(); } | ||
} | ||
} | ||
} |
55 changes: 55 additions & 0 deletions
55
dotnet/test/common/CustomDriverConfigs/WindowFocusInternetExplorerDriver.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
using OpenQA.Selenium.Remote; | ||
|
||
namespace OpenQA.Selenium.IE | ||
{ | ||
// This is a simple wrapper class to create an InternetExplorerDriver that | ||
// uses the enables RequireWindowFocus as the default input simplation. | ||
public class WindowFocusInternetExplorerDriver : InternetExplorerDriver | ||
{ | ||
private static string servicePath = string.Empty; | ||
|
||
public WindowFocusInternetExplorerDriver(InternetExplorerDriverService service) | ||
: this(service, DefaultOptions) | ||
{ | ||
} | ||
|
||
public WindowFocusInternetExplorerDriver(InternetExplorerDriverService service, InternetExplorerOptions options) | ||
: base(service, options) | ||
{ | ||
} | ||
|
||
public static string ServicePath | ||
{ | ||
get { return servicePath; } | ||
set { servicePath = value; } | ||
} | ||
|
||
public static InternetExplorerDriverService DefaultService | ||
{ | ||
get | ||
{ | ||
InternetExplorerDriverService service; | ||
if (string.IsNullOrEmpty(servicePath)) | ||
{ | ||
service = InternetExplorerDriverService.CreateDefaultService(); | ||
} | ||
else | ||
{ | ||
service = InternetExplorerDriverService.CreateDefaultService(servicePath); | ||
} | ||
|
||
// For debugging purposes, one can uncomment the following lines | ||
// to generate a log from the driver executable. Please do not | ||
// commit changes to this file with these lines uncommented. | ||
// service.LogFile = @"iedriver.log"; | ||
// service.LoggingLevel = InternetExplorerDriverLogLevel.Debug; | ||
return service; | ||
} | ||
} | ||
|
||
public static InternetExplorerOptions DefaultOptions | ||
{ | ||
get { return new InternetExplorerOptions() { RequireWindowFocus = true, UsePerProcessProxy = true }; } | ||
} | ||
} | ||
} |