title: 'Error: java: cannot access java.util.function.Function' - while trying to use WebDriverWait
body: <p>I'm using Maven and Intellij, project set for jdk-12.0.2, maven in pom 1.8 and when trying to run this code :</p>
  
  <pre><code>WebDriverWait wait = new WebDriverWait(driver, 5);
  WebElement el =  wait.until(ExpectedConditions.elementToBeClickable(By.linkText("https://poczta.wp.pl")));
  </code></pre>
  
  <p>I get :</p>
  
  <blockquote>
    <p>Error:(37, 30) java: cannot access java.util.function.Function   class
    file for java.util.function.Function not found</p>
  </blockquote>
  
  <p>Pointing to 'wait'</p>
  
  <p>Tried changing maven in pom from 1.7 to 1.8. > <code>Invalidate cache/Restart</code></p>