示例#1
0
 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();
 }
示例#2
0
 public void BrowserTearDown()
 {
     DriverConnections.StopBrowser();
 }
示例#3
0
 public static void AfterAuthenticationScenario()
 {
     DriverConnections.StopBrowser();
 }