Graphene Implementation 1.0.0.CR3

org.jboss.arquillian.ajocado.waiting.conditions
Class CountEquals

java.lang.Object
  extended by org.jboss.arquillian.ajocado.waiting.conditions.CountEquals
All Implemented Interfaces:
JavaScriptCondition, SeleniumCondition

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.

Version:
$Revision$
Author:
Lukas Fryc

Constructor Summary
protected CountEquals()
          Instantiates a new text equals.
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CountEquals

protected CountEquals()
Instantiates a new text equals.

Method Detail

isTrue

public boolean isTrue()
Description copied from interface: SeleniumCondition
Returns true if condition is satisfied, false if it isn't.

Specified by:
isTrue in interface SeleniumCondition
Returns:
true if desired condition is satisfied, false if it isn't

getJavaScriptCondition

public JavaScript getJavaScriptCondition()
Description copied from interface: JavaScriptCondition
Gets JavaScript which define condition what it should be waited for satisfaction.

Specified by:
getJavaScriptCondition in interface JavaScriptCondition
Returns:
JavaScript defining condition

getInstance

public static CountEquals getInstance()
Factory method.

Returns:
single instance of CountEquals

locator

public CountEquals locator(IterableLocator<?> iterableLocator)

Returns the CountEquals instance with given elementLocator set.

From this locator will be the count of elements.

Parameters:
iterableLocator - the element locator
Returns:
the CountEquals object with preset locator

count

public CountEquals count(int count)

Returns the CountEquals instance with the count set.

For this count of elements will condition wait.

Parameters:
count - it should wait for this element count
Returns:
the CountEquals object with preset value

Graphene Implementation 1.0.0.CR3

Copyright © 2012 JBoss by Red Hat. All Rights Reserved.