org.alfresco.webdrone.share
Class LoginPage

java.lang.Object
  extended by org.alfresco.webdrone.Page
      extended by org.alfresco.webdrone.share.SharePage
          extended by org.alfresco.webdrone.share.LoginPage
All Implemented Interfaces:
HtmlPage

public class LoginPage
extends SharePage
implements HtmlPage

Login Page object that holds all information and methods that can be found on the login page.

Since:
1.0
Author:
Michael Suzuki

Field Summary
 
Fields inherited from class org.alfresco.webdrone.Page
DEFAULT_PAGE_LOADING_TIME_WAIT, drone, version
 
Constructor Summary
LoginPage(IWebDrone drone)
          Constructor.
 
Method Summary
 boolean exists()
          Verify if login html element div is displayed.
 boolean isLoggedIn()
          Verifies if a user is currently logged in
 void loginAs(String username, String password)
          Logs user into the site by first finding the login panel,populating the fields and submitting the form.
 LoginPage render()
          Page renderer verifies the page has rendered by checking java script page loaded status is complete.
 LoginPage render(long time)
          Page renderer verifies the page has rendered by checking all elements are visible and loaded by the max limit time set.
 LoginPage render(RenderTime timer)
          Page renderer verifies the page has rendered by checking all elements are visible and loaded.
 
Methods inherited from class org.alfresco.webdrone.share.SharePage
basicRender, disbaleFileUploadFlash, findButton, getLogin, getNav, getPageTitle, getSearch, isLogoPresent, isTitlePresent, panelExists
 
Methods inherited from class org.alfresco.webdrone.Page
close, getScreenShot, getTitle, isBrowserTitle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.alfresco.webdrone.HtmlPage
close, getTitle
 

Constructor Detail

LoginPage

public LoginPage(IWebDrone drone)
Constructor.

Method Detail

render

public LoginPage render(RenderTime timer)
                 throws PageException
Description copied from interface: HtmlPage
Page renderer verifies the page has rendered by checking all elements are visible and loaded. To verify this assertion every page object that implements the method will contain logic to determine if the page has loaded completely in the given time set by the RenderTime.

Specified by:
render in interface HtmlPage
Parameters:
timer - RenderTime time to wait
Returns:
HtmlPage page object response
Throws:
PageException

render

public LoginPage render()
                 throws PageException
Description copied from interface: HtmlPage
Page renderer verifies the page has rendered by checking java script page loaded status is complete.

Specified by:
render in interface HtmlPage
Returns:
HtmlPage object response
Throws:
PageException

render

public LoginPage render(long time)
                 throws PageException
Description copied from interface: HtmlPage
Page renderer verifies the page has rendered by checking all elements are visible and loaded by the max limit time set.

Specified by:
render in interface HtmlPage
Returns:
HtmlPage page object response
Throws:
PageException

exists

public boolean exists()
Verify if login html element div is displayed.

Returns:
true if panel is displayed

loginAs

public void loginAs(String username,
                    String password)
Logs user into the site by first finding the login panel,populating the fields and submitting the form.

Parameters:
username - String username value
password - String password value

isLoggedIn

public boolean isLoggedIn()
Verifies if a user is currently logged in

Returns:
true if user is logged in


Copyright © 2012. All Rights Reserved.