Java 含硒M3预期条件的Lambda表达式使用情况?

Java 含硒M3预期条件的Lambda表达式使用情况?,java,selenium-webdriver,Java,Selenium Webdriver,过去几年我一直在使用下面的代码,如何使用lambda表达式来处理预期的条件 Wait<WebDriver> wait = new FluentWait<WebDriver>(getDriver()) .withTimeout(10, TimeUnit.SECONDS) .pollingEvery(5),TimeUnit.SECONDS) .ignorin

过去几年我一直在使用下面的代码,如何使用lambda表达式来处理预期的条件

Wait<WebDriver> wait = new FluentWait<WebDriver>(getDriver())
                    .withTimeout(10, TimeUnit.SECONDS)
                    .pollingEvery(5),TimeUnit.SECONDS)
                    .ignoring(NoSuchElementException.class);
            wait.until(ExpectedConditions.visibilityOfElementLocated(by));
Wait Wait=new FluentWait(getDriver())
.带超时(10,时间单位。秒)
.每(5)次轮询一次,时间单位为秒)
.忽略(NoSuchElementException.class);
等待。直到(预期条件。被定位元素的可视性);