public static void SnapIfTestFalse()
        {
            if (TestContext.CurrentContext.Result.Outcome != ResultState.Failure)
            {
                return;
            }
            var screenShotName = CreateFilename();

            ThreadDriverManager.GetWebDriver().TakeScreenshot().SaveAsFile(screenShotName);
            TestContext.AddTestAttachment(screenShotName);
            AllureLifecycle.Instance.AddAttachment(screenShotName);
        }
示例#2
0
 public Control(IWebElement element)
 {
     WrappedElement = element;
     Driver         = ThreadDriverManager.GetWebDriver();
 }