El tipo FluentWait no es genérico; no se puede parametrizar con argumentos de error <WebDriver> para la clase FluentWait a través de Selenium y Java

Estoy trabajando conSelenium Standalone Server 3.0.1. Estoy tratando de agregar unExplicit Wait a mi código para detectar un elemento a través de xpath cuando el elemento se hace visible. Para obtener ayuda de Java, busqué el código fuente deSelenium Standalone Server 3.0.1 pero no pudo encontrarlo. Encontré el código fuente enselenium-java-2.53.1 lanzamiento. Lo descargué y encontréselenium-java-2.53.1-srcs y añadido a miEclipse IDE. De la ayuda deFluentWait, Simplemente copié el código pegado en miEclipse IDE y cambió los nombres de las variables.

El código de muestra en la documentación es como:

   // Waiting 30 seconds for an element to be present on the page, checking
   // for its presence once every 5 seconds.
    Wait<WebDriver> wait = new FluentWait<WebDriver>(driver)
       .withTimeout(30, SECONDS)
       .pollingEvery(5, SECONDS)
       .ignoring(NoSuchElementException.class);

    WebElement foo = wait.until(new Function<WebDriver, WebElement>() {
     public WebElement apply(WebDriver driver) {
       return driver.findElement(By.id("foo"));
      }
    });

Pero cuando implemente este código, simplemente copie y pegue:

       Wait<WebDriver> wait = new FluentWait<WebDriver>(driver)
           .withTimeout(30, TimeUnit.SECONDS)
           .pollingEvery(5, TimeUnit.SECONDS)
           .ignoring(NoSuchElementException.class);

       WebElement element = wait.until(new Function<WebDriver, WebElement>()        {
         public WebElement apply(WebDriver driver) {
           return driver.findElement(By.xpath("//p[text()='WebDriver']"));
         }
       });

Recibo un error enFluentWait Clasificar comoThe type FluentWait is not generic; it cannot be parameterized with arguments <WebDriver>

Aquí está la lista de mis importaciones:

    import java.util.concurrent.TimeUnit;
    import org.apache.log4j.Logger;
    import org.apache.log4j.PropertyConfigurator;
    import org.openqa.selenium.By;
    import org.openqa.selenium.NoSuchElementException;
    import org.openqa.selenium.WebDriver;
    import org.openqa.selenium.WebElement;
    import org.openqa.selenium.chrome.ChromeDriver;
    import org.openqa.selenium.support.ui.Wait;
    import com.google.common.base.Function;

¿Puede alguien ayudarme por favor?

Actualizar

Se agregó unresponder con respecto al constructor modificado deFluido enSelenium v3.11.0

Respuestas a la pregunta(3)

Su respuesta a la pregunta