public static void AfterAuthenticationFeatuer() { if (TestContext.CurrentContext.Result.Outcome.Status == TestStatus.Failed) { var screenshot = ((ITakesScreenshot)DriverConnections.Browser).GetScreenshot(); var filename = TestContext.CurrentContext.Test.Name + "_screenshot_" + DateTime.Now.Ticks + ".Png"; var path = Path.Combine(TestContext.CurrentContext.WorkDirectory, filename); screenshot.SaveAsFile(path, ScreenshotImageFormat.Png); TestContext.AddTestAttachment(path); } DriverConnections.StopBrowser(); }
public void BrowserTearDown() { DriverConnections.StopBrowser(); }
public static void AfterAuthenticationScenario() { DriverConnections.StopBrowser(); }