edu.samplu.common
Class SauceLabsWebDriverHelper

java.lang.Object
  extended by edu.samplu.common.SauceLabsWebDriverHelper
All Implemented Interfaces:
com.saucelabs.common.SauceOnDemandSessionIdProvider

public class SauceLabsWebDriverHelper
extends Object
implements com.saucelabs.common.SauceOnDemandSessionIdProvider

Simple RemoteWebDriver test that demonstrates how to run your Selenium tests with Sauce OnDemand. This test also includes the Sauce JUnit helper classes, which will use the Sauce REST API to mark the Sauce Job as passed/failed. In order to use the SauceOnDemandTestWatcher, the test must implement the SauceOnDemandSessionIdProvider interface.


Field Summary
 com.saucelabs.common.SauceOnDemandAuthentication authentication
          Constructs a SauceOnDemandAuthentication instance using the supplied user name/access key.
static String SAUCE_BROWSER_PROPERTY
          remote.driver.saucelabs.browser
static String SAUCE_KEY_PROPERTY
          remote.driver.saucelabs.key
static String SAUCE_PLATFORM_PROPERTY
          remote.driver.saucelabs.platform
static String SAUCE_POPUP_PROPERTY
          remote.driver.saucelabs.pop.disable
static String SAUCE_PROPERTY
          remote.driver.saucelabs
static String SAUCE_SHARE_PROPERTY
          remote.driver.saucelabs.share
static String SAUCE_USER_PROPERTY
          remote.driver.saucelabs.user
static String SAUCE_VERSION_PROPERTY
          remote.driver.saucelabs.version
 
Constructor Summary
SauceLabsWebDriverHelper()
           
 
Method Summary
 org.openqa.selenium.WebDriver getDriver()
          Returns the driver
 String getSessionId()
           
 void setUp(String className, String testName)
          Saucelabs setup
static void tearDown(boolean passed, String sessionId, String sauceUser, String sauceKey)
          Do Suacelabs related teardown things.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SAUCE_SHARE_PROPERTY

public static final String SAUCE_SHARE_PROPERTY
remote.driver.saucelabs.share

See Also:
Constant Field Values

SAUCE_POPUP_PROPERTY

public static final String SAUCE_POPUP_PROPERTY
remote.driver.saucelabs.pop.disable

See Also:
Constant Field Values

SAUCE_PROPERTY

public static final String SAUCE_PROPERTY
remote.driver.saucelabs

See Also:
Constant Field Values

SAUCE_PLATFORM_PROPERTY

public static final String SAUCE_PLATFORM_PROPERTY
remote.driver.saucelabs.platform

See Also:
Constant Field Values

SAUCE_BROWSER_PROPERTY

public static final String SAUCE_BROWSER_PROPERTY
remote.driver.saucelabs.browser

See Also:
Constant Field Values

SAUCE_USER_PROPERTY

public static final String SAUCE_USER_PROPERTY
remote.driver.saucelabs.user

See Also:
Constant Field Values

SAUCE_KEY_PROPERTY

public static final String SAUCE_KEY_PROPERTY
remote.driver.saucelabs.key

See Also:
Constant Field Values

SAUCE_VERSION_PROPERTY

public static final String SAUCE_VERSION_PROPERTY
remote.driver.saucelabs.version

See Also:
Constant Field Values

authentication

public com.saucelabs.common.SauceOnDemandAuthentication authentication
Constructs a SauceOnDemandAuthentication instance using the supplied user name/access key. To use the authentication supplied by environment variables or from an external file, use the no-arg SauceOnDemandAuthentication constructor.

Constructor Detail

SauceLabsWebDriverHelper

public SauceLabsWebDriverHelper()
Method Detail

setUp

public void setUp(String className,
                  String testName)
           throws Exception
Saucelabs setup

Parameters:
className -
testName -
Throws:
Exception

tearDown

public static void tearDown(boolean passed,
                            String sessionId,
                            String sauceUser,
                            String sauceKey)
                     throws Exception
Do Suacelabs related teardown things. Mostly flag the tests as passed or failed.

Parameters:
passed -
sessionId -
sauceUser -
sauceKey -
Throws:
Exception

getDriver

public org.openqa.selenium.WebDriver getDriver()
Returns the driver

Returns:
WebDriver

getSessionId

public String getSessionId()
Specified by:
getSessionId in interface com.saucelabs.common.SauceOnDemandSessionIdProvider


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