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

}

@@ -39,16 +39,54 @@
 pages;%0A%0A
+import org.openqa.selenium.WebDriver;%0A
 import o
@@ -460,19 +460,56 @@
     
-wait.until(
+com.google.common.base.Predicate%3CWebDriver%3E p = 
 driv
@@ -619,16 +619,38 @@
        %7D
+;%0A        wait.until(p
 );%0A%0A    

Fix previously not occurring bug:The method until(Predicate<WebDriver>) is ambiguous for the type WebDriverWait