Class BaseLoginPage

All Implemented Interfaces:
Animatable<Container>, CanDrop<Container>, Clickable<Container>, Draggable<Container>, HandleMouseEvents<Container>, Scrollable<Container>, Touchable<Container>

public class BaseLoginPage extends BasePage

Base Login Page class

The application login page ancestor class. If the application contains user login functionality, the login page must extend this class. This class contains the methods necessary for the login. These methods can be called anytime in the implementation of the login page. These methods are:

Since:
4.0
Author:
JBStrap
  • Constructor Details

    • BaseLoginPage

      public BaseLoginPage(UI ui, Parameters params)
      Creates the ancestor login page
      Parameters:
      ui - The UI instance, where the page will be displayed.
      params - The page parameters
  • Method Details

    • checkUser

      protected final CurrentUser checkUser(String username, String password)
      Checks (authenticates) the specified user's data
      Parameters:
      username - The username
      password - The password
      Returns:
      If the specified username is correct, it will return the User object, otherwise null
      Throws:
      NullPointerException - IF the user authentication operation is not specified. It can be specified by the JBStrapParamType.AUTHENTICATION JBStrap parameter
      See Also:
    • loginUser

      protected void loginUser(CurrentUser user)
      Logs the user in.
      Parameters:
      user - The built user object, representing the user who is to be logged in.
      Throws:
      IllegalArgumentException - Occurs if the user is specified as null