I want to check to see if a label exists. Sometimes I expect it to be displayed "class.checkLabel(true)" and sometimes I want to check to make sure it is hidden "class.checkLabel(false)". When sending in "false", I am wasting a lot of time waiting for .isPresent to complete.
Is there a way to speed this up besides incorporating WebDriverWait?
public void checkLabel(boolean isLabelVisible) {
boolean result = label.isPresent();
Assert.assertEquals(isLabelVisible, result);
}