示例#1
0
        //trigger after every step of the scenario to capture screenshot of error
        public void AfterStep()
        {
            IWrapsDriver wrapperAccess = (IWrapsDriver)objectContainer.Resolve <IWebDriver>();
            IWebDriver   driver        = wrapperAccess.WrappedDriver;

            if (scenarioContext.TestError != null)
            {
                ScreenshotHelper screenshotTools = new ScreenshotHelper(driver);
                screenshotTools.SnapFullScreenshot(featureContext.FeatureInfo.Title, scenarioContext.ScenarioInfo.Title);
            }
        }