Class WebElementConditions

    • Constructor Detail

      • WebElementConditions

        public WebElementConditions​(FluentWebElement element)
        Creates a new conditions object on element
        Parameters:
        element - underlying element
      • WebElementConditions

        public WebElementConditions​(FluentWebElement element,
                                    boolean negation)
        Creates a new conditions object on element
        Parameters:
        element - underlying element
        negation - negation value
    • Method Detail

      • present

        public boolean present()
        Description copied from interface: FluentConditions
        Check that this element is present
        Specified by:
        present in interface FluentConditions
        Returns:
        true if the element is present, false otherwise.
      • clickable

        public boolean clickable()
        Description copied from interface: FluentConditions
        Check that this element is visible and enabled such that you can click it.
        Specified by:
        clickable in interface FluentConditions
        Returns:
        true if the element can be clicked, false otherwise.
      • stale

        public boolean stale()
        Description copied from interface: FluentConditions
        Check that this element is no longer attached to the DOM.
        Specified by:
        stale in interface FluentConditions
        Returns:
        false if the element is still attached to the DOM, true otherwise.
      • displayed

        public boolean displayed()
        Description copied from interface: FluentConditions
        Check that this element is displayed.
        Specified by:
        displayed in interface FluentConditions
        Returns:
        true if element is displayed, false otherwise.
      • enabled

        public boolean enabled()
        Description copied from interface: FluentConditions
        Check that this element is enabled.
        Specified by:
        enabled in interface FluentConditions
        Returns:
        true if element is enabled, false otherwise.
      • selected

        public boolean selected()
        Description copied from interface: FluentConditions
        Check that this element is selected.
        Specified by:
        selected in interface FluentConditions
        Returns:
        true if element is selected, false otherwise.
      • attribute

        public boolean attribute​(String name,
                                 String value)
        Description copied from interface: FluentConditions
        Check that the attribute has the given value.
        Specified by:
        attribute in interface FluentConditions
        Parameters:
        name - attribute name to check
        value - attribute value to check
        Returns:
        true if the given attribute has the given value, false otherwise.
      • attribute

        public StringConditions attribute​(String name)
        Description copied from interface: FluentConditions
        Check conditions on the given attribute the attribute has the given value.
        Specified by:
        attribute in interface FluentConditions
        Parameters:
        name - attribute name to check
        Returns:
        An object to configure text attribute value conditions.
      • id

        public boolean id​(String id)
        Description copied from interface: FluentConditions
        Check that this element has the given id.
        Specified by:
        id in interface FluentConditions
        Parameters:
        id - id to check
        Returns:
        true if the element has the given id, false otherwise.
      • name

        public boolean name​(String name)
        Description copied from interface: FluentConditions
        Check that this element has the given name
        Specified by:
        name in interface FluentConditions
        Parameters:
        name - name to check
        Returns:
        true if the element has the given name, false otherwise.
      • tagName

        public boolean tagName​(String tagName)
        Description copied from interface: FluentConditions
        Check that this element has the given tagName
        Specified by:
        tagName in interface FluentConditions
        Parameters:
        tagName - tagName to check
        Returns:
        true if the element has the given tagName, false otherwise.
      • value

        public boolean value​(String value)
        Description copied from interface: FluentConditions
        Check that this element has the given value
        Specified by:
        value in interface FluentConditions
        Parameters:
        value - value to check
        Returns:
        true if the element has the given value, false otherwise.
      • className

        public boolean className​(String className)
        Description copied from interface: FluentConditions
        Check that the class attribute has the given class name.
        Specified by:
        className in interface FluentConditions
        Parameters:
        className - class name
        Returns:
        true if it has the given class name, false otherwise.