package hu.adamsan.selenium.framework.pages;

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.support.ui.WebDriverWait;

import hu.adamsan.selenium.framework.selenium.Driver;

public class LoginPage {

    private static final String LOGIN_PAGE = Driver.BASE_ADDRESS + "/wp-login.php";

    public static void goTo() {
        Driver.INSTANCE.navigate().to(LOGIN_PAGE);
        WebDriverWait wait = new WebDriverWait(Driver.INSTANCE, 5);
        com.google.common.base.Predicate<WebDriver> p = driver -> {
            return driver.switchTo().activeElement().getAttribute("id").equals("user_login");
        };
        wait.until(p);

    }

    public static LoginCommand loginAs(String username) {
        return new LoginCommand(username);
    }

}

package hu.adamsan.selenium.framework.pages;

import org.openqa.selenium.support.ui.WebDriverWait;

import hu.adamsan.selenium.framework.selenium.Driver;

public class LoginPage {

    private static final String LOGIN_PAGE = Driver.BASE_ADDRESS + "/wp-login.php";

    public static void goTo() {
        Driver.INSTANCE.navigate().to(LOGIN_PAGE);
        WebDriverWait wait = new WebDriverWait(Driver.INSTANCE, 5);
        wait.until(driver -> {
            return driver.switchTo().activeElement().getAttribute("id").equals("user_login");
        });

    }

    public static LoginCommand loginAs(String username) {
        return new LoginCommand(username);
    }

}

--- 
+++ 
@@ -1,5 +1,6 @@
 package hu.adamsan.selenium.framework.pages;
 
+import org.openqa.selenium.WebDriver;
 import org.openqa.selenium.support.ui.WebDriverWait;
 
 import hu.adamsan.selenium.framework.selenium.Driver;
@@ -11,9 +12,10 @@
     public static void goTo() {
         Driver.INSTANCE.navigate().to(LOGIN_PAGE);
         WebDriverWait wait = new WebDriverWait(Driver.INSTANCE, 5);
-        wait.until(driver -> {
+        com.google.common.base.Predicate<WebDriver> p = driver -> {
             return driver.switchTo().activeElement().getAttribute("id").equals("user_login");
-        });
+        };
+        wait.until(p);
 
     }
 
Fix previously not occurring bug:The method until(Predicate<WebDriver>) is ambiguous for the type WebDriverWait
