public void TearDownForEveryTestMethod() { if (TestContext.CurrentContext.Result.Outcome.Status == TestStatus.Failed) { ScreenshotHelper.TakeAndSaveScreenshot(Driver); } ReportHelper.AddTestOutcomeToReport(TestContext.CurrentContext); if (Driver != null) { Driver.Quit(); } }
public virtual void AfterEachMethod() { ReportHelper.AddTestOutcomeToReport(TestContext.CurrentContext); Driver.Quit(); }