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); }
public Control(IWebElement element) { WrappedElement = element; Driver = ThreadDriverManager.GetWebDriver(); }