public static Condition not(final Condition condition) {
    return new Condition("not " + condition.name, !condition.nullIsAllowed) {
      @Override
      public boolean apply(Driver driver, WebElement element) {
        return !condition.apply(driver, element);
      }

      @Override
      public String actualValue(Driver driver, WebElement element) {
        return condition.actualValue(driver, element);
      }
    };
  }
public static Condition not ( final Condition condition ) { return new Condition ( "not " + condition . name , ! condition . nullIsAllowed ) { @ Override public boolean apply ( Driver driver , WebElement element ) { return ! condition . apply ( driver , element ) ; } @ Override public String actualValue ( Driver driver , WebElement element ) { return condition . actualValue ( driver , element ) ; } } ; }
Negate given condition.
<p>
Used for methods like $.shouldNot(exist), $.shouldNotBe(visible)
<p>
Typically you don't need to use it.