code: public static ExpectedCondition<Boolean> and(final ExpectedCondition<?>... conditions) {
      return new ExpectedCondition<Boolean>() {
        @Override
        public Boolean apply(WebDriver driver) {
          for (ExpectedCondition<?> condition : conditions) {
            Object result = condition.apply(driver);
  
            if (result instanceof Boolean) {
              if (Boolean.FALSE.equals(result)) {
                return false;
              }
            }
  
            if (result == null) {
              return false;
            }
          }
          return true;
        }
  
        @Override
        public String toString() {
          StringBuilder message = new StringBuilder("all conditions to be valid: ");
          Joiner.on(" && ").appendTo(message, conditions);
          return message.toString();
        }
      };
    }
docs: An expectation with the logical and condition of the given list of conditions.
  
  Each condition is checked until all of them return true or not null
  
  @param conditions ExpectedCondition is a list of alternative conditions
  @return true once all conditions are satisfied