public static void ExecuteInternal(ITestContext context) { if (null == context) { throw new ArgumentNullException("context"); } var actualList = GetActual(context); if (string.IsNullOrWhiteSpace(context.Value) && 0 == actualList.Count()) { return; } var expectedList = context.Value.Split(','); if (0 != expectedList.Except(actualList).Count()) { TestCommandHelper.AssertFail(string.Format( CultureInfo.CurrentCulture, Properties.Resources.AssertExpectedAndActual, string.Join(",", expectedList), string.Join(",", actualList))); } }
public static void ExecuteInternal(ITestContext context) { if (null == context) { throw new ArgumentNullException("context"); } var elements = context.FindElements(context.Target); if (0 == elements.Count()) { TestCommandHelper.AssertFail(); } }
public static void ExecuteInternal(ITestContext context) { if (null == context) { throw new ArgumentNullException("context"); } try { var alert = context.Driver.SwitchTo().Alert(); } catch (OpenQA.Selenium.NoAlertPresentException ex) { TestCommandHelper.AssertFail(ex.Message); } }
public static void ExecuteInternal(ITestContext context) { if (null == context) { throw new ArgumentNullException("context"); } var element = context.FindElement(context.Target); var selectElement = new SelectElement(element); if (0 < selectElement.AllSelectedOptions.Count) { return; } TestCommandHelper.AssertFail(); }
public static void ExecuteInternal(ITestContext context) { if (null == context) { throw new ArgumentNullException("context"); } var expected = new List <string>() { context.Value }; var actual = GetActual(context); if (0 != expected.Except(actual).Count()) { TestCommandHelper.AssertFail(string.Format( CultureInfo.CurrentCulture, Properties.Resources.AssertExpectedAndActual, expected, actual)); } }
public void FailTest1() { TestCommandHelper.AssertFail("ok"); }
public void FailTest() { TestCommandHelper.AssertFail(); }