コード例 #1
0
 private static void UnhandledExceptionEventHandler(object sender, System.UnhandledExceptionEventArgs eventArgs)
 {
     test.Fail(eventArgs.ExceptionObject.ToString());
     LogMsg.Error(eventArgs.ExceptionObject.ToString());
     extent.Flush();
     ScreenShot.TakeScreenShot();
     Driver.Session.Quit();
 }
コード例 #2
0
 public static void AfterScenario()
 {
     if (test.Status == Status.Pass)
     {
         test.Pass(ScenarioContext.Current.ScenarioInfo.Title + " has passed!");
     }
     else
     {
         test.Fail("!");
     }
     extent.Flush();
     ScreenShot.TakeScreenShot();
     Driver.Session.Quit();
 }
コード例 #3
0
 public static void AfterDataDrivenTest(string testName)
 {
     ScreenShot.TakeScreenShot(testName);
     Driver.Session.Quit();
 }