org.specrunner.webdriver.assertions
Class PluginCompareDate
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.PluginCompareText
org.specrunner.webdriver.assertions.PluginCompareDate
- All Implemented Interfaces:
- IParameterHolder, IActionType, IParalelPlugin, IPlugin, ISleepPlugin, ITestPlugin, ITimedPlugin, IWaitPlugin
public class PluginCompareDate
- extends PluginCompareText
Compare date fields.
- Author:
- Thiago Santos
| 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 |
FEATURE_FORMAT
public static final String FEATURE_FORMAT
- Feature to set data format on comparisons.
FEATURE_TOLERANCE
public static final String FEATURE_TOLERANCE
- Feature to set tolerance on time comparison.
PluginCompareDate
public PluginCompareDate()
getFormat
public String getFormat()
- The date format.
- Returns:
- The date format.
setFormat
public void setFormat(String format)
- Set the date format.
- Parameters:
format - The format.
getTolerance
public Long getTolerance()
- Gets the time tolerance.
- Returns:
- The time tolerance.
setTolerance
public void setTolerance(Long tolerance)
- Sets the time tolerance.
- Parameters:
tolerance - The time tolerance.
initialize
public void initialize(IContext context)
throws PluginException
- Specified by:
initialize in interface IPlugin- Overrides:
initialize in class AbstractPluginFind
- Throws:
PluginException
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.
- Overrides:
process in class PluginCompareText
- Parameters:
context - The test context.result - A result set.client - The browser.element - The selected element.
- Throws:
PluginException - On execution errors.
isDate
public static boolean isDate(INodeHolder holder)
- Check if the element stand for a date.
- Parameters:
holder - The element.
- Returns:
- true, if is date comparison, false, otherwise.
Copyright © 2013. All rights reserved.