org.specrunner.webdriver.assertions
Class AbstractPluginSelection
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
org.specrunner.webdriver.assertions.AbstractPluginSelection
- All Implemented Interfaces:
- IParameterHolder, IActionType, IParalelPlugin, IPlugin, ISleepPlugin, ITestPlugin, ITimedPlugin, IWaitPlugin
- Direct Known Subclasses:
- PluginOptions, PluginSelected
public abstract class AbstractPluginSelection
- extends AbstractPluginFindSingle
Check elements of a selection.
- Author:
- Thiago Santos
|
Method Summary |
protected abstract int |
checkSelection(IContext context,
IResultSet result,
org.openqa.selenium.WebDriver client,
org.openqa.selenium.WebElement element)
Perform the selection test. |
ActionType |
getActionType()
|
protected boolean |
isSelect(org.openqa.selenium.WebElement element)
Check if element is a select. |
protected 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 int |
testList(IContext context,
IResultSet result,
org.openqa.selenium.WebDriver client,
nu.xom.Nodes nodes,
List<org.openqa.selenium.WebElement> options,
Boolean content)
Perform tests on a list. |
| 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 |
AbstractPluginSelection
public AbstractPluginSelection()
getActionType
public ActionType getActionType()
process
protected void process(IContext context,
IResultSet result,
org.openqa.selenium.WebDriver client,
org.openqa.selenium.WebElement element)
throws PluginException
- Description copied from class:
AbstractPluginFindSingle
- Method delegation which receives the selected element to be used by
subclasses.
- Specified by:
process in class AbstractPluginFindSingle
- Parameters:
context - The test context.result - A result set.client - The browser.element - The selected element.
- Throws:
PluginException - On execution errors.
isSelect
protected boolean isSelect(org.openqa.selenium.WebElement element)
- Check if element is a select.
- Parameters:
element - The select form.
- Returns:
- true, if is select, false, otherwise.
checkSelection
protected abstract int checkSelection(IContext context,
IResultSet result,
org.openqa.selenium.WebDriver client,
org.openqa.selenium.WebElement element)
throws PluginException
- Perform the selection test.
- Parameters:
context - The test.result - The result.client - The web driver.element - The element.
- Returns:
- Number of errors.
- Throws:
PluginException - On comparison errors.
testList
protected int testList(IContext context,
IResultSet result,
org.openqa.selenium.WebDriver client,
nu.xom.Nodes nodes,
List<org.openqa.selenium.WebElement> options,
Boolean content)
- Perform tests on a list.
- Parameters:
context - The context.result - The result set.client - The client.nodes - The nodes to be compared.options - The select options.content - true, to check options, false, to check selected.
- Returns:
- Number of inconsistencies.
Copyright © 2013. All rights reserved.