Graphene Implementation 1.0.0.CR3

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

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

public class StyleEquals
extends Object
implements SeleniumCondition, JavaScriptCondition

Implementation of Condition for waiting if element given by elementLocator has given CSS style property's value equal to given value.

Implements Condition and JavaScriptCondition used in SeleniumWaiting and AjaxWaiting.

Version:
$Revision$
Author:
Lukas Fryc

Constructor Summary
protected StyleEquals()
          Instantiates a new text equals.
 
Method Summary
static StyleEquals 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.
 StyleEquals locator(ElementLocator<?> elementLocator)
           Returns the StyleEquals instance with given elementLocator set.
 StyleEquals property(CssProperty cssProperty)
           Returns the StyleEquals instance with CSS property preset.
 StyleEquals value(String value)
           Returns the StyleEquals instance with value set.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StyleEquals

protected StyleEquals()
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 StyleEquals getInstance()
Factory method.

Returns:
single instance of TextEquals

locator

public StyleEquals locator(ElementLocator<?> elementLocator)

Returns the StyleEquals instance with given elementLocator set.

From this locator will be obtained the CSS property.

Parameters:
elementLocator - the element locator
Returns:
the StyleEquals object with preset locator

property

public StyleEquals property(CssProperty cssProperty)

Returns the StyleEquals instance with CSS property preset.

This CSS property will be obtained in way to compare equality to given value.

Parameters:
cssProperty - the property to obtain
Returns:
the StyleEquals object with preset CSS property to obtain

value

public StyleEquals value(String value)

Returns the StyleEquals instance with value set.

For equality with this value the condition will wait.

Parameters:
value - it should wait for equality
Returns:
the StyleEquals object with preset value

Graphene Implementation 1.0.0.CR3

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