Refactor SeleniumExample
This commit is contained in:
parent
be5ac17249
commit
75a0274fe8
|
@ -40,6 +40,7 @@ public class SeleniumExample {
|
|||
if (webElementList != null) {
|
||||
webElementList.stream()
|
||||
.filter(webElement -> "Close".equalsIgnoreCase(webElement.getAttribute("title")))
|
||||
.filter(WebElement::isDisplayed)
|
||||
.findAny()
|
||||
.ifPresent(WebElement::click);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue