|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.unitils.selenium.WebDriverModule
public class WebDriverModule
| Field Summary | |
|---|---|
protected static String |
BASE_URL_KEY
|
protected static String |
BROWSER_NAME_KEY
|
protected static String |
CHROME_BINARY_KEY
|
protected static String |
CHROME_DRIVER_KEY
|
protected static String |
DOWNLOADPATH
|
protected static String |
FILETYPE
|
protected static String |
FIREFOX_BINARY_KEY
|
protected static String |
IE_BINARY_KEY
|
protected static String |
LIST_AUTOMATICALLY_DOWNLOAD
|
protected static String |
LOGGING_FILE_PROP
|
protected static String |
LOGGINGPROP_BROWSER
|
protected static String |
LOGGINGPROP_CLIENT
|
protected static String |
LOGGINGPROP_CONSOLE_ENABLED
|
protected static String |
LOGGINGPROP_DRIVER
|
protected static String |
LOGGINGPROP_IE
|
protected static String |
LOGGINGPROP_PERFORMANCE
|
protected static String |
LOGGINGPROP_PROFILER
|
protected static String |
LOGGINGPROP_SERVER
|
protected static String |
PACKAGENAME
|
protected static String |
PROXY_HOST_KEY
|
static String |
TARGETSUREFIREREPORTS
|
| Constructor Summary | |
|---|---|
WebDriverModule()
|
|
| Method Summary | |
|---|---|
void |
afterInit()
|
protected void |
checkChromeDriver(String bit,
ClassLoader classLoader)
|
protected void |
checkFirefoxDriver()
This method checks if their is a system property 'webdriver.firefox.bin' and checks if it exists. |
protected void |
checkIEDriver(String bit,
ClassLoader classLoader)
This method checks if there is a system property 'webdriver.ie.driver' and checks if the location exists. |
boolean |
checkIfDriverIsAlreadyInSystem(String systemProp,
String driver,
String systemVarDriver)
|
boolean |
checkIfDriverPropertyExistsInUnitilsProperties(String key,
String driver,
String systemKey)
|
String |
copyDriverIntoNewTempFile(URL url,
String name)
|
protected static String |
createLogNewDriver(String systemVarDriver,
String absPath)
|
protected static String |
getAbsoluteDownloadPath(String path)
|
protected Object |
getElement(org.openqa.selenium.WebDriver webdriver,
Class<?> type)
This is the actual method that creates an object of the correct type and initialises all the elements. |
org.unitils.core.TestListener |
getTestListener()
|
void |
init(Properties configuration)
|
void |
initBaseUrl(Object testObject)
All the elements with the @BaseUrlString will be initialised with the base url value of the unitils.properties. |
void |
initElements(Object testObject)
* Searches all the fields with the WebPage annotation and sets the
correct elements. |
void |
initWebDriver(Object testObject)
Initialises the webdriver. |
protected void |
killWebDriver(Object testObject)
All the webdrivers (all the fields with the TestWebDriver of the
testObject will be killed. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final String PACKAGENAME
protected static final String BROWSER_NAME_KEY
protected static final String BASE_URL_KEY
protected static final String PROXY_HOST_KEY
protected static final String DOWNLOADPATH
protected static final String FILETYPE
protected static final String LIST_AUTOMATICALLY_DOWNLOAD
protected static final String FIREFOX_BINARY_KEY
protected static final String IE_BINARY_KEY
protected static final String CHROME_DRIVER_KEY
protected static final String CHROME_BINARY_KEY
protected static final String LOGGINGPROP_CONSOLE_ENABLED
protected static final String LOGGINGPROP_PERFORMANCE
protected static final String LOGGINGPROP_BROWSER
protected static final String LOGGINGPROP_CLIENT
protected static final String LOGGINGPROP_DRIVER
protected static final String LOGGINGPROP_PROFILER
protected static final String LOGGINGPROP_SERVER
protected static final String LOGGING_FILE_PROP
protected static final String LOGGINGPROP_IE
public static final String TARGETSUREFIREREPORTS
| Constructor Detail |
|---|
public WebDriverModule()
| Method Detail |
|---|
public void init(Properties configuration)
init in interface org.unitils.core.Modulepublic void afterInit()
afterInit in interface org.unitils.core.Modulepublic void initWebDriver(Object testObject)
TestWebDriver and uses the browser choice (in
unitils.properties) to create the driver.
testObject - protected static String getAbsoluteDownloadPath(String path)
protected void killWebDriver(Object testObject)
TestWebDriver of the
testObject will be killed.
testObject - public void initBaseUrl(Object testObject)
testObject - public void initElements(Object testObject)
WebPage annotation and sets the
correct elements.
testObject -
protected void checkChromeDriver(String bit,
ClassLoader classLoader)
protected void checkFirefoxDriver()
FIREFOX_BINARY_KEY in the
unitils.properties.
protected void checkIEDriver(String bit,
ClassLoader classLoader)
IE_BINARY_KEY
in your unitils.properties. The last option is that it uses the driver
that is given by unitils-selenium.
bit - classLoader -
public boolean checkIfDriverIsAlreadyInSystem(String systemProp,
String driver,
String systemVarDriver)
public boolean checkIfDriverPropertyExistsInUnitilsProperties(String key,
String driver,
String systemKey)
public String copyDriverIntoNewTempFile(URL url,
String name)
protected Object getElement(org.openqa.selenium.WebDriver webdriver,
Class<?> type)
webdriver - type -
Objectpublic org.unitils.core.TestListener getTestListener()
getTestListener in interface org.unitils.core.Module
protected static String createLogNewDriver(String systemVarDriver,
String absPath)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||