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(); }
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(); }
public static void AfterDataDrivenTest(string testName) { ScreenShot.TakeScreenShot(testName); Driver.Session.Quit(); }