1 package com.atlassian.pageobjects.page; 2 3 import com.atlassian.pageobjects.Page; 4 5 /** 6 * A login page that logs in a user and sends the browser to the next page 7 */ 8 public interface LoginPage extends Page 9 { 10 /** 11 * Logs in a user and sends the browser to the next page 12 * 13 * @param username The username to login 14 * @param password The password to login with 15 * @param nextPage The next page to visit, which may involve changing the URL. Cannot be null. 16 * @param <M> The page type 17 * @return The next page, fully loaded and initialized. 18 */ 19 <M extends Page> M login(String username, String password, Class<M> nextPage); 20 21 /** 22 * Logs in the default sysadmin user and sends the browser to the next page 23 * 24 * @param nextPage The next page to visit, which may involve changing the URL. Cannot be null. 25 * @param <M> The page type 26 * @return The next page, fully loaded and initialized. 27 */ 28 <M extends Page> M loginAsSysAdmin(Class<M> nextPage); 29 }