edu.samplu.common
Class WebDriverITBase

java.lang.Object
  extended by edu.samplu.common.WebDriverITBase
Direct Known Subclasses:
HelpIT2

public abstract class WebDriverITBase
extends Object

Base class for Selenium Webdriver integration tests

Author:
Kuali Rice Team (rice.collab@kuali.org)

Field Summary
 org.openqa.selenium.WebDriver driver
           
 
Constructor Summary
WebDriverITBase()
           
 
Method Summary
 void assertPopUpWindowUrl(org.openqa.selenium.By by, String windowName, String url)
          Assert that clicking an element causes a popup window with a specific URL
abstract  String getTestUrl()
          Returns the URL to be used with this test
 boolean isElementPresent(org.openqa.selenium.By by)
          Check if an element is present
 boolean isElementPresentQuick(org.openqa.selenium.By by)
          Quickly check if an element is present
 void setUp()
          Setup the WebDriver test, login and load the tested web page
 void tearDown()
          Tear down the WebDriver test
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

driver

public org.openqa.selenium.WebDriver driver
Constructor Detail

WebDriverITBase

public WebDriverITBase()
Method Detail

getTestUrl

public abstract String getTestUrl()
Returns the URL to be used with this test

Returns:
URL of the test

setUp

public void setUp()
           throws Exception
Setup the WebDriver test, login and load the tested web page

Throws:
Exception

tearDown

public void tearDown()
              throws Exception
Tear down the WebDriver test

Throws:
Exception

isElementPresent

public boolean isElementPresent(org.openqa.selenium.By by)
Check if an element is present

This test takes a while due to the 'implicit wait' time.

Parameters:
by - The locating mechanism of the element
Returns:
true if the element is present, false otherwise

isElementPresentQuick

public boolean isElementPresentQuick(org.openqa.selenium.By by)
Quickly check if an element is present

Just like isElementPresent(org.openqa.selenium.By) but with a short 'implicit wait' time. Use this only if it is guaranteed that all elements are rendered.

Parameters:
by - The locating mechanism of the element
Returns:
true if the element is present, false otherwise

assertPopUpWindowUrl

public void assertPopUpWindowUrl(org.openqa.selenium.By by,
                                 String windowName,
                                 String url)
Assert that clicking an element causes a popup window with a specific URL

Parameters:
by - The locating mechanism of the element to be clicked
windowName - The name of the popup window
url - The URL of the popup window


Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.