Ejemplo n.º 1
0
        public void Test()
        {
            var webDriverPool = new WebDriverPool(BrowserPool.ChromeDriverFactory, new DelegateWebDriverCleaner(x => x.ResetWindows()));

            using (var pooled = webDriverPool.AcquireWrapper())
            {
                var webDriver = pooled.WrappedDriver;
                webDriver.Navigate().GoToUrl("http://google.com");
                Thread.Sleep(1000);
            }

            Thread.Sleep(1000);
            using (var pooled = webDriverPool.AcquireWrapper())
            {
                var webDriver = pooled.WrappedDriver;
                Assert.That(webDriver.Url, Is.EqualTo("about:blank"));
                webDriver.Navigate().GoToUrl("http://google.com");
                Thread.Sleep(1000);
            }

            webDriverPool.Clear();
        }
Ejemplo n.º 2
0
 public void TearDown()
 {
     WebDriverPool.Clear();
 }