コード例 #1
0
 public void AllowPooling()
 {
     for (int i = 0; i < BrowserFactories.Count; i++)
     {
         BrowserFactories[i] = new PoolingDriverFactory(BrowserFactories[i]);
     }
 }
コード例 #2
0
 public PoolDriverToken(PoolingDriverFactory pool, IWebDriverToken driver)
 {
     driverToken = driver;
     this.pool = pool;
 }
コード例 #3
0
 public void Dispose()
 {
     try
     {
         ExpectedConditions.AlertIsPresent()(Driver)?.Dismiss();
         Driver.Manage().Cookies.DeleteAllCookies();
         Driver.Navigate().GoToUrl("about:blank");
         pool.ReturnDriver(driverToken);
         pool = null;
     }
     catch
     {
         // ignore, recyclation failed - we'll create new one
     }
 }