Example #1
0
        public void SetTimeoutsGetWaitDriver()
        {
            IWebDriver driver    = null;
            IWebDriver newDriver = null;

            try
            {
                driver    = WebDriverFactory.GetDefaultBrowser();
                newDriver = WebDriverFactory.GetDefaultBrowser();
                SeleniumUtilities.SetTimeouts(driver);
                WebDriverWait wait = SeleniumConfig.GetWaitDriver(newDriver);
                Assert.AreEqual(wait.Timeout.TotalMilliseconds.ToString(), Config.GetValueForSection("SeleniumMaqs", "BrowserTimeout", "0"));
            }
            finally
            {
                try
                {
                    driver?.KillDriver();
                }
                finally
                {
                    newDriver?.KillDriver();
                }
            }
        }