public static IWebDriver CreateFirefoxDriver(this WebDriverConfig config) { config.ValidateNotNull(nameof(config)); config.ValidateDriverName("Firefox"); var options = new FirefoxOptions(); options.PlatformName = config.PlatformName; options.BrowserVersion = config.BrowserVersion; options.AddAdditionalCapabilies(config); if (config.Arguments.IsNotNullOrEmpty()) { options.AddArguments(config.Arguments); } var commandTimeout = GetCommandTimeout(config); return((config.IsLocal() ? new FirefoxDriver(GetDriverPath(config), options, commandTimeout) : new RemoteWebDriver(GetRemoteHubUri(config), options.ToCapabilities(), commandTimeout)) .ApplyCommon(config)); }