Class XPathCondition

  • All Implemented Interfaces:
    Condition

    @Immutable
    public class XPathCondition
    extends Object
    implements Condition
    A condition which returns true if the XPath expression returns one or more elements. NOTE: element names must be in upper case and attributes in lower case.
    • Field Detail

      • expression

        private final String expression
    • Constructor Detail

      • XPathCondition

        public XPathCondition​(String expression)
        Construct xpath condition.
        Parameters:
        expression - The actual xpath expression.
    • Method Detail

      • check

        public boolean check​(EmbeddedBrowser browser)
        Specified by:
        check in interface Condition
        Parameters:
        browser - The browser.
        Returns:
        whether the evaluated condition is satisfied
      • checkXPathExpression

        private boolean checkXPathExpression​(EmbeddedBrowser browser)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object