Example #1
0
        public static void IsNotChecked(this IOperationRunner <IElementWrapper> operationRunner)
        {
            operationRunner.TagName("input", "Function IsNotChecked() can be used on input element only.");
            operationRunner.Attribute("type", new[] { "checkbox", "radio" }, failureMessage: "Input element must be type of checkbox or radio.");

            var IsNotChecked = new IsNotCheckedValidator();

            operationRunner.Evaluate <UnexpectedElementStateException>(IsNotChecked);
        }
Example #2
0
 public static void ClassAttribute(this IOperationRunner <IElementWrapper> operationRunner, string attributeName, Expression <Func <string, bool> > expression, string failureMessage = "")
 {
     operationRunner.Attribute("class", expression, failureMessage);
 }
Example #3
0
 public static void HasNotClass(this IOperationRunner <IElementWrapper> operationRunner, string value, bool caseSensitive = false)
 {
     operationRunner.Attribute("class", p => !p.Split(' ').Select(s => s.Trim()).Any(c => string.Equals(c, value,
                                                                                                        caseSensitive ? StringComparison.Ordinal : StringComparison.OrdinalIgnoreCase)), $"Expected value: '{value}'.");
 }
Example #4
0
 public static void ClassAttribute(this IOperationRunner <IElementWrapper> operationRunner, string value, bool caseSensitive = false, bool trimValue = true)
 {
     operationRunner.Attribute("class", value, caseSensitive, trimValue);
 }