Class ExplainedCondition


  • @ParametersAreNonnullByDefault
    public class ExplainedCondition
    extends Condition
    • Constructor Detail

      • ExplainedCondition

        public ExplainedCondition​(Condition delegate,
                                  java.lang.String message)
    • Method Detail

      • apply

        public boolean apply​(Driver driver,
                             org.openqa.selenium.WebElement element)
        Description copied from class: Condition
        Check if given element matches this condition.
        Specified by:
        apply in class Condition
        element - given WebElement
        Returns:
        true if element matches condition
      • actualValue

        public java.lang.String actualValue​(Driver driver,
                                            org.openqa.selenium.WebElement element)
        Description copied from class: Condition
        If element didn't match the condition, returns the actual value of element. Used in error reporting. Optional. Makes sense only if you need to add some additional important info to error message.
        Overrides:
        actualValue in class Condition
        Parameters:
        driver - given driver
        element - given WebElement
        Returns:
        any string that needs to be appended to error message.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class Condition