org.specrunner.webdriver.assertions
Class PluginCompareNode
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.PluginCompareNode
- All Implemented Interfaces:
- IParameterHolder, IActionType, IParalelPlugin, IPlugin, ISleepPlugin, ITestPlugin, ITimedPlugin, IWaitPlugin
public class PluginCompareNode
- extends AbstractPluginFindSingle
Compare strings.
- 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 |
PluginCompareNode
public PluginCompareNode()
getContains
public Boolean getContains()
- Defines the attribute comparison strategy as contains. For example, if
the specification says:
<div class="compareNode" by="id:idNode>My name is <span style="background-color:red;">Thiago</span></div>
And the system under test return the following for 'idNode':
My name is <span style="background-color:red; font-family:Times New Roman">Thiago</span>
The result is comparison success, when contains is set to
true, otherwise comparison failure.
Default is false.
- Returns:
- true, to use substring on attribute comparisons, false, to use
equals comparison.
setContains
public void setContains(Boolean contains)
- Set attribute comparison flag.
- Parameters:
contains - The value.
getStrict
public Boolean getStrict()
- Gets the strict flag.
- Returns:
- true, to strict comparison, false, otherwise.
setStrict
public void setStrict(Boolean strict)
- Set strict comparator.
- Parameters:
strict - The comparator flag.
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.
isNode
public static boolean isNode(INodeHolder holder)
- Check if the element stand for a node.
- Parameters:
holder - The element.
- Returns:
- true, if is node comparison, false, otherwise.
Copyright © 2013. All rights reserved.