wait.until(ExpectedConditions) doesnt work any more in selenium


So far I used 2.45.0 version of selenium and all my waits were done in this way:

WebDriverWait wait = new WebDriverWait(webKitUtility.getWebDriver(), 5);

But I updated selenium to 3.1.0 and I am getting the error:

“The method until(Predicate) in the type FluentWait is not applicable for the arguments

I see that from 2.45.0 to 3.1.0 some things are deprecated. I am trying to investigate what is the best way to do it now, but I am not sure. Most of the things I’m finding on google are old information explaining the same way I was using so far.

  • You must to post comments

I had the same issue.

I fixed it by using the not deprecated .until() method of WebDriverWait and by adding the following to my maven pom.xml:


Other than that, my code looks exactly like before.

To be more specific there are now two .until() methods.

The old one (which is deprecated):

public void until(final Predicate<T> isTrue) {}

And the new one:

public <V> V until(Function<? super T, V> isTrue) {}

  • You must to post comments
Showing 1 result
Your Answer
Post as a guest by filling out the fields below or if you already have an account.