the Sign-in page. */ public class SignInPage { protected WebDriver driver; // <input name="user_name" type="text" value=""> private By usernameBy = By.name("user_name"); // <input name="password" type="password" value=""> private By passwordBy = By.name("password"); // <input name="sign_in" type="submit" value="SignIn"> private By signinBy = By.name("sign_in"); public SignInPage(WebDriver driver){ this.driver = driver; if (!driver.getTitle().equals("Sign In Page")) { throw new IllegalStateException("This is not Sign In Page," + " current page is: " + driver.getCurrentUrl()); } }