コード例 #1
0
 private void VerifyPageIsAlive()
 {
     JsLogger.Complete();
     if (alive == null)
     {
         throw new InvalidOperationException("Данная страница уже закрыта");
     }
 }
コード例 #2
0
 public virtual void SetUp()
 {
     Log4NetConfiguration.InitializeOnce();
     WebDriverCache.RestartIfNeed();
     WebDriverCache.WebDriver.DeleteAllCookies();
     WebDriverCache.WebDriver.CleanDownloadDirectory();
     PageLoadCounter.Reset();
     JsLogger.Reset();
 }
コード例 #3
0
 private void TearDownInternal()
 {
     try
     {
         PageLoadCounter.AssertPageNotLoaded();
     }
     finally
     {
         TestContext testContext = TestContext.CurrentContext;
         try
         {
             if (testContext.Result.Status == TestStatus.Failed)
             {
                 CaptureJavascriptErrors();
                 JsLogger.Show();
                 WebDriverCache.WebDriver.CaptureScreenshot();
             }
         }
         catch
         {
             Console.Out.WriteLine("Cannot save screenshot. Probably TearDown method called not in NUnit context");
         }
     }
 }
コード例 #4
0
 public virtual void SetUp()
 {
     JsLogger.Reset();
     WebDriver.MaximizeWindow();
 }