diff --git a/Aquality.Selenium/src/Aquality.Selenium/Browsers/LocalBrowserFactory.cs b/Aquality.Selenium/src/Aquality.Selenium/Browsers/LocalBrowserFactory.cs index ffcaf76..fe29db1 100644 --- a/Aquality.Selenium/src/Aquality.Selenium/Browsers/LocalBrowserFactory.cs +++ b/Aquality.Selenium/src/Aquality.Selenium/Browsers/LocalBrowserFactory.cs @@ -46,7 +46,7 @@ protected override DriverContext DriverContext { case BrowserName.Chrome: case BrowserName.Yandex: - driverCtx = GetDriver(() => ChromeDriverService.CreateDefaultService(), + driverCtx = GetDriverContext(() => ChromeDriverService.CreateDefaultService(), (ChromeOptions)driverSettings.DriverOptions, commandTimeout); break; case BrowserName.Firefox: @@ -59,25 +59,25 @@ protected override DriverContext DriverContext return geckoService; }; - driverCtx = GetDriver(geckoServiceProvider, (FirefoxOptions)driverSettings.DriverOptions, commandTimeout); + driverCtx = GetDriverContext(geckoServiceProvider, (FirefoxOptions)driverSettings.DriverOptions, commandTimeout); break; case BrowserName.IExplorer: - driverCtx = GetDriver(() => InternetExplorerDriverService.CreateDefaultService(), + driverCtx = GetDriverContext(() => InternetExplorerDriverService.CreateDefaultService(), (InternetExplorerOptions)driverSettings.DriverOptions, commandTimeout); break; case BrowserName.Edge: - driverCtx = GetDriver(() => EdgeDriverService.CreateDefaultService(), + driverCtx = GetDriverContext(() => EdgeDriverService.CreateDefaultService(), (EdgeOptions)driverSettings.DriverOptions, commandTimeout); break; case BrowserName.Opera: var config = new OperaConfig(); var operaSettings = (OperaSettings)driverSettings; var driverPath = new DriverManager().SetUpDriver(config, operaSettings.WebDriverVersion, operaSettings.SystemArchitecture); - driverCtx = GetDriver(() => ChromeDriverService.CreateDefaultService(Path.GetDirectoryName(driverPath), config.GetBinaryName()), + driverCtx = GetDriverContext(() => ChromeDriverService.CreateDefaultService(Path.GetDirectoryName(driverPath), config.GetBinaryName()), (ChromeOptions)driverSettings.DriverOptions, commandTimeout); break; case BrowserName.Safari: - driverCtx = GetDriver(() => SafariDriverService.CreateDefaultService(), + driverCtx = GetDriverContext(() => SafariDriverService.CreateDefaultService(), (SafariOptions)driverSettings.DriverOptions, commandTimeout); break; default: @@ -88,7 +88,7 @@ protected override DriverContext DriverContext } } - private DriverContext GetDriver(Func driverServiceProvider, DriverOptions driverOptions, TimeSpan commandTimeout) where T : WebDriver + private DriverContext GetDriverContext(Func driverServiceProvider, DriverOptions driverOptions, TimeSpan commandTimeout) where T : WebDriver { var currentBrowserVersionRegex = new Regex(CurrentBrowserVersionPattern, RegexOptions.None, TimeoutConfiguration.Condition); try