コード例 #1
0
        public static void AlertTextEquals(this IOperationRunner <IBrowserWrapper> operationRunner, string expectedValue,
                                           bool caseSensitive = false, bool trim = true)
        {
            var AlertTextEquals = new AlertTextEqualsValidator(expectedValue, caseSensitive, trim);

            operationRunner.Evaluate <AlertException>(AlertTextEquals);
        }
コード例 #2
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);
        }
コード例 #3
0
        public static void ContainsText(this IOperationRunner <IElementWrapper> operationRunner)
        {
            var ContainsText = new ContainsTextValidator();

            operationRunner.Evaluate <UnexpectedElementStateException>(ContainsText);
        }
コード例 #4
0
        public static void TitleNotEquals(this IOperationRunner <IBrowserWrapper> operationRunner, string title, bool caseSensitive = false, bool trim = true)
        {
            var TitleNotEquals = new TitleNotEqualsValidator(title, caseSensitive, trim);

            operationRunner.Evaluate <BrowserException>(TitleNotEquals);
        }
コード例 #5
0
        public static void Text(this IOperationRunner <IElementWrapper> operationRunner, Expression <Func <string, bool> > rule, string failureMessage = null)
        {
            var text = new TextValidator(rule, failureMessage);

            operationRunner.Evaluate <UnexpectedElementStateException>(text);
        }
コード例 #6
0
        public static void Url(this IOperationRunner <IBrowserWrapper> operationRunner, Expression <Func <string, bool> > expression, string failureMessage = null)
        {
            var Url = new CurrentUrlValidator(expression, failureMessage);

            operationRunner.Evaluate <BrowserLocationException>(Url);
        }
コード例 #7
0
        public static void UrlEquals(this IOperationRunner <IBrowserWrapper> operationRunner, string url)
        {
            var checkUrlEquals = new UrlEqualsValidator(url);

            operationRunner.Evaluate <BrowserLocationException>(checkUrlEquals);
        }
コード例 #8
0
        public static void JsPropertyInnerText(this IOperationRunner <IElementWrapper> operationRunner, Expression <Func <string, bool> > rule, string failureMesssage = null, bool trim = true)
        {
            var JsPropertyInnerText = new JsPropertyInnerTextValidator(rule, failureMesssage, trim);

            operationRunner.Evaluate <UnexpectedElementStateException>(JsPropertyInnerText);
        }
コード例 #9
0
        public static void InnerText(this IOperationRunner <IElementWrapper> operationRunner, Expression <Func <string, bool> > rule)
        {
            var innerText = new InnerTextValidator(rule);

            operationRunner.Evaluate <UnexpectedElementStateException>(innerText);
        }
コード例 #10
0
        public static void TagName(this IOperationRunner <IElementWrapper> operationRunner, string[] expectedTagNames, string failureMessage = null)
        {
            var checkTagName = new TagNameValidator(expectedTagNames, failureMessage);

            operationRunner.Evaluate <UnexpectedElementStateException>(checkTagName);
        }
コード例 #11
0
        public static void NotContainsElement(this IOperationRunner <IElementWrapper> operationRunner, string cssSelector, Func <string, By> tmpSelectMethod = null)
        {
            var NotContainsElement = new NotContainsElementValidator(cssSelector, tmpSelectMethod);

            operationRunner.Evaluate <MoreElementsInSequenceException>(NotContainsElement);
        }
コード例 #12
0
        public static void IsElementNotInView(this IOperationRunner <IElementWrapper> operationRunner, ElementWrapper element)
        {
            var IsElementNotInView = new IsElementNotInViewValidator(element);

            operationRunner.Evaluate <UnexpectedElementStateException>(IsElementNotInView);
        }
コード例 #13
0
        public static void HyperLineEquals(this IOperationRunner <IElementWrapper> operationRunner, string url, UrlKind kind, params UriComponents[] components)
        {
            var HyperLinkEquals = new HyperLinkEqualsValidator(url, kind, true, components);

            operationRunner.Evaluate <UnexpectedElementStateException>(HyperLinkEquals);
        }
コード例 #14
0
        public static void DoesNotContainsText(this IOperationRunner <IElementWrapper> operationRunner)
        {
            var DoesNotContainsText = new TextEmptyValidator();

            operationRunner.Evaluate <UnexpectedElementStateException>(DoesNotContainsText);
        }
コード例 #15
0
        public static void AlertText(this IOperationRunner <IBrowserWrapper> operationRunner, Expression <Func <string, bool> > expression, string failureMessage = "")
        {
            var AlertText = new AlertTextValidator(expression, failureMessage);

            operationRunner.Evaluate <AlertException>(AlertText);
        }
コード例 #16
0
        public static void JsPropertyInnerHtmlEquals(this IOperationRunner <IElementWrapper> operationRunner, string text, bool caseSensitive = false, bool trim = true)
        {
            var JsPropertyInnerHtmlEquals = new JsPropertyInnerHtmlEqualsValidator(text, caseSensitive, trim);

            operationRunner.Evaluate <UnexpectedElementStateException>(JsPropertyInnerHtmlEquals);
        }
コード例 #17
0
        public static void AlertTextContains(this IOperationRunner <IBrowserWrapper> operationRunner, string expectedValue, bool trim = true)
        {
            var AlertTextContains = new AlertTextContainsValidator(expectedValue, trim);

            operationRunner.Evaluate <AlertException>(AlertTextContains);
        }
コード例 #18
0
        public static void JsPropertyInnerHtml(this IOperationRunner <IElementWrapper> operationRunner, Expression <Func <string, bool> > expression, string failureMessage = null)
        {
            var JsPropertyInnerHtml = new JsPropertyInnerHtmlValidator(expression, failureMessage);

            operationRunner.Evaluate <UnexpectedElementStateException>(JsPropertyInnerHtml);
        }
コード例 #19
0
        public static void Url(this IOperationRunner <IBrowserWrapper> operationRunner, string url, UrlKind urlKind, params UriComponents[] components)
        {
            var checkUrl = new UrlValidator(url, urlKind, components);

            operationRunner.Evaluate <BrowserLocationException>(checkUrl);
        }
コード例 #20
0
        public static void Attribute(this IOperationRunner <IElementWrapper> operationRunner, string attributeName, string[] allowedValues, bool caseSensitive = false, bool trimValue = true, string failureMessage = null)
        {
            var checkAttribute = new AttributeValuesValidator(attributeName, allowedValues, caseSensitive, trimValue, failureMessage);

            operationRunner.Evaluate <UnexpectedElementStateException>(checkAttribute);
        }
コード例 #21
0
        //TODO
        //public static void HyperLinkEquals(this IOperationRunner<IBrowserWrapper> operationRunner, string selector, string url, UrlKind kind, params UriComponents[] components)
        //{
        //    var HyperLinkEquals = new HyperLinkEqualsValidator(selector, url, kind, components);
        //    operationRunner.Evaluate<UnexpectedElementStateException>(HyperLinkEquals);
        //}

        //public static void IsDisplayed(this IOperationRunner<IBrowserWrapper> operationRunner, string selector, Expression<Func<string, By>> tmpSelectedMethod = null)
        //{
        //    var IsDisplayed = new IsDisplayed();
        //    operationRunner.Evaluate<UnexpectedElementStateException>(IsDisplayed);
        //}
        //public static void IsNotDisplayed(this IOperationRunner<IBrowserWrapper> operationRunner, string selector, Expression<Func<string, By>> tmpSelectedMethod = null)
        //{
        //    var IsNotDisplayed = new Checkers.BrowserWrapperCheckers.IsNotDisplayed(selector, tmpSelectedMethod);
        //    operationRunner.Evaluate<BrowserException>(IsNotDisplayed);
        //}

        public static void UrlIsAccessible(this IOperationRunner <IBrowserWrapper> operationRunner, string url, UrlKind urlKind)
        {
            var UrlIsAccessible = new UrlIsAccessibleValidator(url, urlKind);

            operationRunner.Evaluate <BrowserException>(UrlIsAccessible);
        }
コード例 #22
0
        public static void Attribute(this IOperationRunner <IElementWrapper> operationRunner, string attributeName, Expression <Func <string, bool> > expression, string failureMessage = null)
        {
            var Attribute = new AttributeValidator(attributeName, expression, failureMessage);

            operationRunner.Evaluate <UnexpectedElementStateException>(Attribute);
        }
コード例 #23
0
        public static void Title(this IOperationRunner <IBrowserWrapper> operationRunner, Expression <Func <string, bool> > expression, string failureMessage = "")
        {
            var Title = new TitleValidator(expression, failureMessage);

            operationRunner.Evaluate <BrowserException>(Title);
        }
コード例 #24
0
        public static void Value(this IOperationRunner <IElementWrapper> operationRunner, string value, bool caseSensitive = false, bool trim = true)
        {
            var Value = new ValueValidator(value, caseSensitive, trim);

            operationRunner.Evaluate <UnexpectedElementStateException>(Value);
        }
コード例 #25
0
        public static void TextNotEquals(this IOperationRunner <IElementWrapper> operationRunner, string text, bool caseSensitive = false, bool trim = true, string failureMessage = null)
        {
            var textNotEquals = new TextNotEqualsValidator(text, caseSensitive, trim);

            operationRunner.Evaluate <UnexpectedElementStateException>(textNotEquals);
        }
コード例 #26
0
        public static void HasNotAttribute(this IOperationRunner <IElementWrapper> operationRunner, string name)
        {
            var HasNotAttribute = new HasNotAttributeValidator(name);

            operationRunner.Evaluate <UnexpectedElementStateException>(HasNotAttribute);
        }
コード例 #27
0
        public static void IsSelected(this IOperationRunner <IElementWrapper> operationRunner)
        {
            var IsSelected = new IsSelectedValidator();

            operationRunner.Evaluate <UnexpectedElementStateException>(IsSelected);
        }
コード例 #28
0
        public static void IsNotClickable(this IOperationRunner <IElementWrapper> operationRunner)
        {
            var isNotClickable = new IsNotClickableValidator();

            operationRunner.Evaluate <UnexpectedElementStateException>(isNotClickable);
        }