public class TextEquals extends Object implements SeleniumCondition, JavaScriptCondition
Implementation of Condition for waiting if element given by elementLocator has text equal to given text.
Implements Condition and JavaScriptCondition used in SeleniumWaiting and AjaxWaiting.
| Modifier | Constructor and Description |
|---|---|
protected |
TextEquals()
Instantiates a new text equals.
|
| Modifier and Type | Method and Description |
|---|---|
static TextEquals |
getInstance()
Factory method.
|
JavaScript |
getJavaScriptCondition()
Gets JavaScript which define condition what it should be waited for satisfaction.
|
boolean |
isTrue()
Returns true if condition is satisfied, false if it isn't.
|
TextEquals |
locator(ElementLocator<?> elementLocator)
Returns the TextEquals instance with given elementLocator set.
|
TextEquals |
text(String text)
Returns the TextEquals instance with text set.
|
public boolean isTrue()
SeleniumConditionisTrue in interface SeleniumConditionpublic JavaScript getJavaScriptCondition()
JavaScriptConditiongetJavaScriptCondition in interface JavaScriptConditionpublic static TextEquals getInstance()
public TextEquals locator(ElementLocator<?> elementLocator)
Returns the TextEquals instance with given elementLocator set.
From this locator will be obtained the text.
elementLocator - the element locatorpublic TextEquals text(String text)
Returns the TextEquals instance with text set.
For equality with this text the condition will wait.
text - it should wait for equalityCopyright © 2013 JBoss by Red Hat. All Rights Reserved.