Skip to content

Selenium.WebDriver.WebDriverFactoryNunitConfig

Alexander Dunn edited this page Feb 21, 2019 · 2 revisions

This package is a simple .NET Standard library provided to allow easy configuration of Selenium WebDriver instances launched by the Selenium.WebDriver.NetCoreWebDriverFactory

Namespace: AlexanderOnTest.WebDriverFactoryNunitConfig.TestSettings

Class: WebDriverSettings

The primary intended property for use is:

  • public static IWebDriverConfiguration WebDriverConfiguration

If you prefer however the individual configurations are also available

  • public static Browser Browser
  • public static Uri GridUri
  • public static bool IsLocal
  • public static PlatformType PlatformType
  • public static WindowSize WindowSize
  • public static bool Headless

In addition:

Class: Utils

Provides the methods that I used in generating them if you would like to use them for generating your own TestSettings class for additional configurations

  • public static string GetSettingOrDefault(string settingName, string defaultValue)
  • public static T GetEnumSettingOrDefault<T>(string settingName, T defaultValue) where T : Enum
  • public static bool GetBoolSettingOrDefault(string settingName, bool defaultValue)
  • public static T GetConfigFromFileSystemIfPresent<T>(string filename, System.Environment.SpecialFolder fileLocation = Environment.SpecialFolder.MyDocuments)
Clone this wiki locally