Closed ham1 closed 8 years ago
I've created a PR which solved the visibilityOf(checkBox)
problem from an interface point of view.
However List
s are more complex. When doing
// wait has timeout of 10s
wait.until(visibilityOfAllElements(checkBoxes.stream()
.map(te -> (WebElement) te)
// same behaviour with
//.map(TypifiedElement::getWrappedElement)
.collect(toList())))
It fails after 5s (the implicit wait as mentioned in #111) - is there a way, without using the @Timeout
everywhere, to utilise the explicit wait for lists?
Is there a reason that
TypifiedElement
doesn't implementWebElement
?The main reason for asking is to simplify use of
ExpectedConditions
, especially when using a list of them e.g.List<CheckBox> checkboxes
.I'd like to do:
wait.until(ExpectedConditions.visibilityOfAllElements(checkboxes))
but because visibilityOfAllElements only acceptsList<WebElement>
this doesn't work, equally forvisibilityOf
having to add.getWrappedElement()
isn't ideal.Also, as the PageFactory replaces them with lazy proxies if trying to convert that into a list of WebElements to wait for, I'm not sure the following would work?
Or is there something I've missed?