public class CountEquals extends Object implements SeleniumCondition, JavaScriptCondition
Implementation of Condition for waiting if count of elements with given locator is equal to given count.
Implements Condition and JavaScriptCondition used in SeleniumWaiting and AjaxWaiting.
| Modifier | Constructor and Description |
|---|---|
protected |
CountEquals()
Instantiates a new text equals.
|
| Modifier and Type | Method and Description |
|---|---|
CountEquals |
count(int count)
Returns the CountEquals instance with the count set.
|
static CountEquals |
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.
|
CountEquals |
locator(IterableLocator<?> iterableLocator)
Returns the CountEquals instance with given elementLocator set.
|
public boolean isTrue()
SeleniumConditionisTrue in interface SeleniumConditionpublic JavaScript getJavaScriptCondition()
JavaScriptConditiongetJavaScriptCondition in interface JavaScriptConditionpublic static CountEquals getInstance()
public CountEquals locator(IterableLocator<?> iterableLocator)
Returns the CountEquals instance with given elementLocator set.
From this locator will be the count of elements.
iterableLocator - the element locatorpublic CountEquals count(int count)
Returns the CountEquals instance with the count set.
For this count of elements will condition wait.
count - it should wait for this element countCopyright © 2012 JBoss by Red Hat. All Rights Reserved.