public static ElementSelector or ( final ElementSelector ... selectors ) { if ( selectors == null ) { throw new IllegalArgumentException ( SELECTORS_MUST_NOT_BE_NULL ) ; } final Collection < ElementSelector > s = Arrays . asList ( selectors ) ; if ( any ( s , new IsNullPredicate ( ) ) ) { throw new IllegalArgumentException ( "selectors must not contain null values" ) ; } return new ElementSelector ( ) { @ Override public boolean canBeCompared ( Element controlElement , Element testElement ) { return any ( s , new CanBeComparedPredicate ( controlElement , testElement ) ) ; } } ; }
Accepts two elements if at least one of the given ElementSelectors does .