예제 #1
0
        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);
            }
        }
예제 #2
0
        public void TearDownForEveryTestMethod()
        {
            if (TestContext.CurrentContext.Result.Outcome.Status == TestStatus.Failed)
            {
                ScreenshotHelper.TakeAndSaveScreenshot(Driver);
            }

            ReportHelper.AddTestOutcomeToReport(TestContext.CurrentContext);


            if (Driver != null)
            {
                Driver.Quit();
            }
        }
예제 #3
0
        public void TearDownForEveryTestMethod()
        {
            if (TestContext.CurrentTestOutcome == UnitTestOutcome.Failed)
            {
                ScreenshotHelper.TakeAndSaveScreenshot(Driver);
            }

            ReportManager.AddTestOutcomeToReport(TestContext);


            if (Driver != null)
            {
                Driver.Quit();
            }
        }