Graphene Implementation 1.0.0.CR3

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

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

public class AlertEquals
extends Object
implements SeleniumCondition, JavaScriptCondition

Implementation of Condition for waiting if alert is shown and its message has has given value.

If the alert appears but it's message doesn't match expected message, the SeleniumException is thrown.

Implements Condition and JavaScriptCondition used in SeleniumWaiting and AjaxWaiting.

Version:
$Revision$
Author:
Lukas Fryc

Constructor Summary
protected AlertEquals()
          Instantiates a new message equals.
 
Method Summary
static AlertEquals 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.
 AlertEquals message(String message)
           Returns the AlertEquals instance with text set.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AlertEquals

protected AlertEquals()
Instantiates a new message 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 AlertEquals getInstance()
Factory method.

Returns:
single instance of AlertEquals

message

public AlertEquals message(String message)

Returns the AlertEquals instance with text set.

For equality with this text the condition will wait.

Parameters:
message - it should wait for equality
Returns:
the AlertEquals object with preset text

Graphene Implementation 1.0.0.CR3

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