public void BeforeStep(ScenarioContext scenarioContext) { ReportHelper.AddStepInfo(scenarioContext.StepContext.StepInfo.StepDefinitionType.ToString(), scenarioContext.StepContext.StepInfo.Text); if (scenarioContext.TestError != null) { ScreenshotHelper.TakeAndSaveScreenshot(_driver); ReportHelper.AddTestResult(scenarioContext.TestError); } }
public void TearDownForEveryTestMethod() { if (TestContext.CurrentContext.Result.Outcome.Status == TestStatus.Failed) { ScreenshotHelper.TakeAndSaveScreenshot(Driver); } ReportHelper.AddTestOutcomeToReport(TestContext.CurrentContext); if (Driver != null) { Driver.Quit(); } }
public void TearDownForEveryTestMethod() { if (TestContext.CurrentTestOutcome == UnitTestOutcome.Failed) { ScreenshotHelper.TakeAndSaveScreenshot(Driver); } ReportManager.AddTestOutcomeToReport(TestContext); if (Driver != null) { Driver.Quit(); } }