public void AfterTest(ITest test) { if (TestContext.CurrentContext.Result.Outcome.Status == TestStatus.Failed) { var now = DateTime.Now; ScreenshotSaver.Save(BrowserSetUp.browser.GetScreenshot().AsByteArray, TestContext.CurrentContext.Test.FullName, now); } }
public void AfterTest(ITest test) { if (TestContext.CurrentContext.Result.Outcome.Status == TestStatus.Failed) { var now = DateTime.Now; ScreenshotSaver.Save(Convert.FromBase64String(BrowserSetUp.browser.GetScreenshot()), TestContext.CurrentContext.Test.FullName, now); } }
public void SaveScreenshot(string testName) { var screenshotBytesInBase64 = GetScreenshot(); if (screenshotBytesInBase64 == null) { throw new Exception("Can't take screenshot"); } ScreenshotSaver.Save(Convert.FromBase64String(screenshotBytesInBase64), testName, DateTime.Now); }
public void SaveScreenshot(string testName) { var screenshot = GetScreenshot(); if (screenshot == null) { throw new Exception("Can't take screenshot"); } ScreenshotSaver.Save(screenshot.AsByteArray, testName, DateTime.Now); }
public void AfterTest(ITest test) { if (TestContext.CurrentContext.Result.Outcome.Status == TestStatus.Failed) { var now = DateTime.Now; var context = TestContext.CurrentContext; ScreenshotSaver.Save( BrowserSetUp.browser.GetScreenshot().AsByteArray, string.Join(".", context.Test.ClassName, context.Test.Name), now); } }