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

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:

<dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
      <version>21.0</version>
</dependency>

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) {}

Leave a Comment