org.exoplatform.portal.test.selenium.tools
Class AbstractPortalTestCase

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by com.thoughtworks.selenium.SeleneseTestCase
              extended by org.exoplatform.portal.test.selenium.tools.AbstractPortalTestCase
All Implemented Interfaces:
junit.framework.Test

public class AbstractPortalTestCase
extends com.thoughtworks.selenium.SeleneseTestCase

add some tools for helping creating selenium test case.


Field Summary
static java.lang.String DEFAULTPASSWORD
          the default timeout password in eXo.
static java.lang.String DEFAULTTIMEOUT
          the default timeout.
static int DEFAULTTIMEOUTSEC
          the default timeout in sec.
 
Fields inherited from class com.thoughtworks.selenium.SeleneseTestCase
selenium
 
Constructor Summary
AbstractPortalTestCase()
           
 
Method Summary
protected  int getLastIndex(java.lang.String locator)
          return the number of element in a collection.
 void login(java.lang.String login, java.lang.String password)
          login to the portal using the given credentials.
 void loginAsJohn()
          login to the portal with the john account.
 void loginAsMarry()
          login to the portal with the marry account.
 void loginAsRoot()
          login to the portal with the root account.
 void logout()
          logout of the portal.
 void setUp()
          add the capture of screenshot in case of error.
 
Methods inherited from class com.thoughtworks.selenium.SeleneseTestCase
assertEquals, assertEquals, assertEquals, assertEquals, assertNotEquals, assertNotEquals, checkForVerificationErrors, clearVerificationErrors, getText, isCaptureScreetShotOnFailure, pause, runBare, seleniumEquals, seleniumEquals, setCaptureScreetShotOnFailure, setUp, setUp, tearDown, verifyEquals, verifyEquals, verifyEquals, verifyFalse, verifyNotEquals, verifyNotEquals, verifyTrue
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULTTIMEOUT

public static final java.lang.String DEFAULTTIMEOUT
the default timeout. it is used when waiting for a page to load

See Also:
Constant Field Values

DEFAULTTIMEOUTSEC

public static final int DEFAULTTIMEOUTSEC
the default timeout in sec. it is used when waiting for a page to load

See Also:
Constant Field Values

DEFAULTPASSWORD

public static final java.lang.String DEFAULTPASSWORD
the default timeout password in eXo.

See Also:
Constant Field Values
Constructor Detail

AbstractPortalTestCase

public AbstractPortalTestCase()
Method Detail

login

public final void login(java.lang.String login,
                        java.lang.String password)
login to the portal using the given credentials.

Parameters:
login - the username to login in the portal
password - the password of the user

setUp

public void setUp()
           throws java.lang.Exception
add the capture of screenshot in case of error.

Overrides:
setUp in class com.thoughtworks.selenium.SeleneseTestCase
Throws:
java.lang.Exception - on an initialization error

loginAsRoot

public final void loginAsRoot()
login to the portal with the root account.


loginAsJohn

public final void loginAsJohn()
login to the portal with the john account.


loginAsMarry

public final void loginAsMarry()
login to the portal with the marry account.


logout

public final void logout()
logout of the portal.


getLastIndex

protected final int getLastIndex(java.lang.String locator)
return the number of element in a collection.

Parameters:
locator - xpath expression to locate the element
Returns:
the number of element


Copyright © 2012 eXo Platform SAS. All Rights Reserved.