July 2019
Intermediate to advanced
536 pages
12h 57m
English
Java 8.
Java Stream API provides a filter() method to filter stream elements on the basis of the given predicate. Suppose we want to get all the link elements that are visible on the page, we can use the filter() method to return the list in the following way:
List<WebElement> visibleLinks = links.stream() .filter(item -> item.isDisplayed()) .collect(Collectors.toList());
count().
False.
Read now
Unlock full access