|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.specrunner.parameters.core.ParameterHolder
org.specrunner.plugins.core.AbstractPlugin
org.specrunner.plugins.core.AbstractPluginNamed
org.specrunner.plugins.core.AbstractPluginScoped
org.specrunner.plugins.core.AbstractPluginValue
org.specrunner.webdriver.AbstractPluginBrowserAware
public abstract class AbstractPluginBrowserAware
A generic plugin that acts over a webdriver.
| Field Summary | |
|---|---|
static String |
FEATURE_DIR
Default directory to save downloaded files. |
static String |
FEATURE_INTERVAL
Feature for interval. |
static String |
FEATURE_MAXWAIT
Feature to set max interval. |
static String |
FEATURE_TIMEOUT
Default timeout to finish the action. |
static String |
FEATURE_WAITFOR
Wait for feature. |
| Fields inherited from class org.specrunner.plugins.core.AbstractPlugin |
|---|
FEATURE_CONDITION, FEATURE_NORMALIZED, FEATURE_SLEEP, FEATURE_THREADSAFE, FEATURE_WAIT |
| Constructor Summary | |
|---|---|
AbstractPluginBrowserAware()
|
|
| Method Summary | |
|---|---|
void |
doEnd(IContext context,
IResultSet result)
|
protected abstract void |
doEnd(IContext context,
IResultSet result,
org.openqa.selenium.WebDriver client)
Method delegation which receives the browser to be used by subclasses. |
String |
getBrowserName()
Gets the browser name. |
String |
getDir()
Get current download directory, if any. |
String |
getDownload()
The download target. |
Long |
getInterval()
The interval between JavaScript finish checks. |
Long |
getMaxwait()
The max time to wait for JavaScript return. |
protected org.openqa.selenium.support.ui.ExpectedCondition<?> |
getWaitCondition(long start,
Long timeout)
Return the condition to wait. |
String |
getWaitfor()
XPath expression to wait for. |
void |
initialize(IContext context)
|
protected boolean |
isWaitForClient()
Sign actions to wait for browser response. |
void |
setDir(String dir)
Set current download directory, if any. |
void |
setDownload(String download)
Set download name. |
void |
setInterval(Long interval)
Change the interval. |
void |
setMaxwait(Long maxwait)
Set the max wait interval. |
void |
setWaitfor(String waitfor)
Set the XPath condition to wait for. |
protected void |
waitForClient(org.openqa.selenium.WebDriver client)
Wait for client. |
| Methods inherited from class org.specrunner.plugins.core.AbstractPluginValue |
|---|
getValue, getValue, isEval, setEval, setValue |
| Methods inherited from class org.specrunner.plugins.core.AbstractPluginScoped |
|---|
getScope, saveGlobal, saveLocal, saveStrict, setScope |
| Methods inherited from class org.specrunner.plugins.core.AbstractPluginNamed |
|---|
getName, setName |
| Methods inherited from class org.specrunner.plugins.core.AbstractPlugin |
|---|
copy, doStart, getCondition, getConditionModel, getNormalized, getNormalized, getParent, getSleep, getSleepModel, getThreadsafe, getTimeout, getTimeoutModel, getWait, getWaitModel, setCondition, setConditionModel, setNormalized, setParent, setSleep, setSleepModel, setThreadsafe, setTimeout, setTimeoutModel, setWait, setWaitModel, toString |
| Methods inherited from class org.specrunner.parameters.core.ParameterHolder |
|---|
getParameters, setParameters |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.specrunner.parameters.IParameterHolder |
|---|
getParameters, setParameters |
| Methods inherited from interface org.specrunner.plugins.IActionType |
|---|
getActionType |
| Field Detail |
|---|
public static final String FEATURE_INTERVAL
public static final String FEATURE_MAXWAIT
public static final String FEATURE_WAITFOR
public static final String FEATURE_TIMEOUT
public static final String FEATURE_DIR
| Constructor Detail |
|---|
public AbstractPluginBrowserAware()
| Method Detail |
|---|
public Long getInterval()
public void setInterval(Long interval)
interval - The interval.public Long getMaxwait()
public void setMaxwait(Long maxwait)
maxwait - The max wait.public String getWaitfor()
public void setWaitfor(String waitfor)
waitfor - The condition.public String getDir()
public void setDir(String dir)
dir - The directory.public String getDownload()
public void setDownload(String download)
download - The download file name.
public void initialize(IContext context)
throws PluginException
initialize in interface IPlugininitialize in class AbstractPluginPluginException
public void doEnd(IContext context,
IResultSet result)
throws PluginException
doEnd in interface IPlugindoEnd in class AbstractPluginPluginExceptionpublic String getBrowserName()
protected abstract void doEnd(IContext context,
IResultSet result,
org.openqa.selenium.WebDriver client)
throws PluginException
context - The test context.result - The result set.client - The browser.
PluginException - On execution errors.protected boolean isWaitForClient()
protected void waitForClient(org.openqa.selenium.WebDriver client)
client - The client.
protected org.openqa.selenium.support.ui.ExpectedCondition<?> getWaitCondition(long start,
Long timeout)
waitfor attribute is
provided, the condition turn into <xpath>.isDisplayed().
start - The begin time.timeout - The timeout.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||