Class CollectionCondition

    • Field Detail

      • explanation

        protected java.lang.String explanation
    • Constructor Detail

      • CollectionCondition

        public CollectionCondition()
    • Method Detail

      • fail

        public abstract void fail​(WebElementsCollection collection,
                                  java.util.List<org.openqa.selenium.WebElement> elements,
                                  java.lang.Exception lastError,
                                  long timeoutMs)
      • size

        @CheckReturnValue
        public static CollectionCondition size​(int expectedSize)
        Checks that collection has the given size
      • sizeGreaterThan

        @CheckReturnValue
        public static CollectionCondition sizeGreaterThan​(int expectedSize)
      • sizeGreaterThanOrEqual

        @CheckReturnValue
        public static CollectionCondition sizeGreaterThanOrEqual​(int expectedSize)
      • sizeLessThan

        @CheckReturnValue
        public static CollectionCondition sizeLessThan​(int expectedSize)
      • sizeLessThanOrEqual

        @CheckReturnValue
        public static CollectionCondition sizeLessThanOrEqual​(int size)
      • sizeNotEqual

        @CheckReturnValue
        public static CollectionCondition sizeNotEqual​(int expectedSize)
      • texts

        @CheckReturnValue
        public static CollectionCondition texts​(java.lang.String... expectedTexts)
        Checks that given collection has given texts (each collection element CONTAINS corresponding text)

        NB! Ignores multiple whitespaces between words

      • texts

        @CheckReturnValue
        public static CollectionCondition texts​(java.util.List<java.lang.String> expectedTexts)
        Checks that given collection has given texts (each collection element CONTAINS corresponding text)

        NB! Ignores multiple whitespaces between words

      • textsInAnyOrder

        @CheckReturnValue
        public static CollectionCondition textsInAnyOrder​(java.lang.String... expectedTexts)
        Checks that given collection has given texts in any order (each collection element CONTAINS corresponding text)

        NB! Ignores multiple whitespaces between words

      • textsInAnyOrder

        @CheckReturnValue
        public static CollectionCondition textsInAnyOrder​(java.util.List<java.lang.String> expectedTexts)
        Checks that given collection has given texts in any order (each collection element CONTAINS corresponding text)

        NB! Ignores multiple whitespaces between words

      • exactTexts

        @CheckReturnValue
        public static CollectionCondition exactTexts​(java.lang.String... expectedTexts)
        Checks that given collection has given texts (each collection element EQUALS TO corresponding text)

        NB! Ignores multiple whitespaces between words

      • exactTexts

        @CheckReturnValue
        public static CollectionCondition exactTexts​(java.util.List<java.lang.String> expectedTexts)
        Checks that given collection has given texts (each collection element EQUALS TO corresponding text)

        NB! Ignores multiple whitespaces between words

      • anyMatch

        @CheckReturnValue
        public static CollectionCondition anyMatch​(java.lang.String description,
                                                   java.util.function.Predicate<org.openqa.selenium.WebElement> predicate)
        Checks if ANY elements of this collection match the provided predicate
        Parameters:
        description - The description of the given predicate
        predicate - the Predicate to match
      • allMatch

        @CheckReturnValue
        public static CollectionCondition allMatch​(java.lang.String description,
                                                   java.util.function.Predicate<org.openqa.selenium.WebElement> predicate)
        Checks if ALL elements of this collection match the provided predicate
        Parameters:
        description - The description of the given predicate
        predicate - the Predicate to match
      • noneMatch

        @CheckReturnValue
        public static CollectionCondition noneMatch​(java.lang.String description,
                                                    java.util.function.Predicate<org.openqa.selenium.WebElement> predicate)
        Checks if NONE elements of this collection match the provided predicate
        Parameters:
        description - The description of the given predicate
        predicate - the Predicate to match
      • because

        public CollectionCondition because​(java.lang.String explanation)
        Should be used for explaining the reason of condition
      • applyNull

        public abstract boolean applyNull()