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.
| Modifier | Constructor and Description |
|---|---|
protected |
StyleEquals()
Instantiates a new text equals.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
public boolean isTrue()
SeleniumConditionisTrue in interface SeleniumConditionpublic JavaScript getJavaScriptCondition()
JavaScriptConditiongetJavaScriptCondition in interface JavaScriptConditionpublic static StyleEquals getInstance()
public StyleEquals locator(ElementLocator<?> elementLocator)
Returns the StyleEquals instance with given elementLocator set.
From this locator will be obtained the CSS property.
elementLocator - the element locatorpublic 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.
cssProperty - the property to obtainpublic StyleEquals value(String value)
Returns the StyleEquals instance with value set.
For equality with this value the condition will wait.
value - it should wait for equalityCopyright © 2012 JBoss by Red Hat. All Rights Reserved.