org.specrunner.webdriver
Class AbstractPluginFindSingle
java.lang.Object
org.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
org.specrunner.webdriver.AbstractPluginFind
org.specrunner.webdriver.AbstractPluginFindSingle
- All Implemented Interfaces:
- IParameterHolder, IActionType, IParalelPlugin, IPlugin, ISleepPlugin, ITestPlugin, ITimedPlugin, IWaitPlugin
- Direct Known Subclasses:
- AbstractPluginSelect, AbstractPluginSelection, PluginCheckAtt, PluginClear, PluginClickHoldOn, PluginClickNext, PluginClickOn, PluginCompareNode, PluginCompareTable, PluginCompareText, PluginContains, PluginContextClick, PluginDoubleClickOn, PluginDragAndDrop, PluginFrameOn, PluginMoveBy, PluginMoveTo, PluginReleaseOn, PluginSubmit, PluginType
public abstract class AbstractPluginFindSingle
- extends AbstractPluginFind
A specialization of AbstractPluginFind to be overridden by actions that take
only one element to perform its action. The default selection is the first
element found. If multiple elements are found by the search strategy use
'index' attribute to specify which one to be selected.
- Author:
- Thiago Santos
|
Field Summary |
protected int |
index
The element index. |
|
Method Summary |
int |
getIndex()
Element index, to be used when XPath returns more than one element. |
protected abstract void |
process(IContext context,
IResultSet result,
org.openqa.selenium.WebDriver client,
org.openqa.selenium.WebElement element)
Method delegation which receives the selected element to be used by
subclasses. |
protected void |
process(IContext context,
IResultSet result,
org.openqa.selenium.WebDriver client,
org.openqa.selenium.WebElement[] elements)
Method delegation which receives the elements to be used by subclasses. |
void |
setIndex(int index)
Set the index position. |
| Methods inherited from class org.specrunner.webdriver.AbstractPluginBrowserAware |
doEnd, getBrowserName, getDir, getDownload, getInterval, getMaxwait, getWaitCondition, getWaitfor, isWaitForClient, setDir, setDownload, setInterval, setMaxwait, setWaitfor, waitForClient |
| 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 |
index
protected int index
- The element index.
AbstractPluginFindSingle
public AbstractPluginFindSingle()
getIndex
public int getIndex()
- Element index, to be used when XPath returns more than one element.
- Returns:
- The element index.
setIndex
public void setIndex(int index)
- Set the index position.
- Parameters:
index - The index.
process
protected void process(IContext context,
IResultSet result,
org.openqa.selenium.WebDriver client,
org.openqa.selenium.WebElement[] elements)
throws PluginException
- Description copied from class:
AbstractPluginFind
- Method delegation which receives the elements to be used by subclasses.
- Specified by:
process in class AbstractPluginFind
- Parameters:
context - The test context.result - The result set.client - The browser.elements - The elements filtered by search strategy.
- Throws:
PluginException - On execution errors.
process
protected abstract void process(IContext context,
IResultSet result,
org.openqa.selenium.WebDriver client,
org.openqa.selenium.WebElement element)
throws PluginException
- Method delegation which receives the selected element to be used by
subclasses.
- Parameters:
context - The test context.result - A result set.client - The browser.element - The selected element.
- Throws:
PluginException - On execution errors.
Copyright © 2013. All rights reserved.