private void VerifyPageIsAlive() { JsLogger.Complete(); if (alive == null) { throw new InvalidOperationException("Данная страница уже закрыта"); } }
public virtual void SetUp() { Log4NetConfiguration.InitializeOnce(); WebDriverCache.RestartIfNeed(); WebDriverCache.WebDriver.DeleteAllCookies(); WebDriverCache.WebDriver.CleanDownloadDirectory(); PageLoadCounter.Reset(); JsLogger.Reset(); }
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"); } } }
public virtual void SetUp() { JsLogger.Reset(); WebDriver.MaximizeWindow(); }