Start() private method

private Start ( ) : void
return void
コード例 #1
0
        private void SetWebDriverToIE()
        {
            var driverPath = AppConfiguration.BrowserDirectory + UtilityHelpers._separator + "InternetExplorer" + UtilityHelpers._separator + _ieDir;
            _service = InternetExplorerDriverService.CreateDefaultService(driverPath);
            var _settings = new InternetExplorerOptions {
                IntroduceInstabilityByIgnoringProtectedModeSettings = true,
                EnableNativeEvents = true,
                IgnoreZoomLevel = true
            };

            try
            {
                _service.Start();
            }
            catch (DriverServiceNotFoundException err)
            {
                throw new DriverServiceNotFoundException(err.Message);
            }

            _capabilities = DesiredCapabilities.InternetExplorer();
            WebDriver = new RemoteWebDriver(_service.ServiceUrl, _capabilities);
        }
コード例 #2
0
        private void SetWebDriverToIE()
        {
            var driverExePath = _driverPaths + "ie" + Path.DirectorySeparatorChar + _ieDriverServer;
            _driverservice = InternetExplorerDriverService.CreateDefaultService(driverExePath);
            var settings = new InternetExplorerOptions
            {
                IntroduceInstabilityByIgnoringProtectedModeSettings = true,
                EnsureCleanSession = true
            };

            try
            {
                _driverservice.Start();
            }
            catch (Exception err)
            {
                throw new DriverServiceNotFoundException(err.Message);
            }

            _capabilities = DesiredCapabilities.InternetExplorer();
            SetAdditionalCapabilities();

            WebDriver = new ScreenShotRemoteWebDriver(_driverservice.ServiceUrl, _capabilities);
        }
コード例 #3
0
        private void SetWebDriverToChrome()
        {
            var driverPath = AppConfiguration.BrowserDirectory + UtilityHelpers._separator + "Chrome" + UtilityHelpers._separator + _chromeDir;
            _service = ChromeDriverService.CreateDefaultService(driverPath);

            try
            {
                _service.Start();
            }
            catch (DriverServiceNotFoundException err)
            {
                throw new DriverServiceNotFoundException(err.Message);
            }

            _capabilities = DesiredCapabilities.Chrome();
            WebDriver = new RemoteWebDriver(_service.ServiceUrl, _capabilities);
        }
コード例 #4
0
        private void SetWebDriverToChrome()
        {
            var driverExePath = _driverPaths + "chrome" + Path.DirectorySeparatorChar + _chromedriver;
            _driverservice = ChromeDriverService.CreateDefaultService(driverExePath);
            var settings = new ChromeOptions
            {
                BinaryLocation = "",
                LeaveBrowserRunning = true
            };

            try
            {
                _driverservice.Start();
            }
            catch (Exception err)
            {
                throw new DriverServiceNotFoundException(err.Message);
            }

            _capabilities = DesiredCapabilities.Chrome();
            SetAdditionalCapabilities();

            WebDriver = new ScreenShotRemoteWebDriver(_driverservice.ServiceUrl, _capabilities);
        }