org.aludratest.service.gui.component
Interface Element<E extends Element<E>>

Type Parameters:
E - Type of the concrete element, to be used by subclasses.
All Superinterfaces:
GUIComponent
All Known Subinterfaces:
Button, Checkbox, Dropdownbox, FileField, GenericElement, InputField, Label, Link, RadioButton
All Known Implementing Classes:
AbstractElement, ButtonImpl, CheckboxImpl, DropdownboxImpl, FileFieldImpl, GenericElementImpl, InputFieldImpl, LabelImpl, LinkImpl, RadioButtonImpl

public interface Element<E extends Element<E>>
extends GUIComponent

Parent interface for GUI Elements e.g. Button.

Author:
Joerg Langnickel, Volker Bergmann

Method Summary
 void assertEnabled()
          Asserts that this element is enabled, i.e. does not have an active "disabled" state.
 void assertFocus()
          Asserts that the element has the focus.
 void assertNotEnabled()
          Asserts that this element is not enabled, i.e. has an active "disabled" state.
 void assertNotPresent()
          Asserts that the element is not present
 void assertPresent()
          Asserts that the element is present
 void assertVisible()
          Asserts that the element is visible
 void click()
          Single-clicks the element.
 void click(String click)
          Selectable click- clicks only when provided string is not null, not marked as null and provided string is "true"
 void doubleClick()
          Double clicks the element.
 void focus()
          Sets the focus on this element
 GUIElementLocator getLocator()
           
 boolean isEnabled()
          Checks whether this input element is enabled.
 boolean isEnabled(long timeout)
          Checks whether this input element is enabled.
 boolean isNotPresent()
          Checks if the specified element is nowhere on the page within the standard timeout.
 boolean isNotPresent(long timeout)
          Checks if the specified element is nowhere on the page within the standard timeout.
 boolean isPresent()
          Checks if the specified element is somewhere on the page within the standard timeout.
 boolean isPresent(long timeout)
          Checks if the specified element is somewhere on the page within a given timeout
 boolean isPresentAndInForeground()
          Checks if the specified element is somewhere on the page and in foreground within the standard timeout.
 boolean isVisible()
          Checks if the specified element is visible within the standard timeout.
 boolean isVisible(long timeout)
          Checks if the specified element is visible within the given timeout.
 E waitingUntilTaskCompletion()
          Activates the waiting until task completion feature on the underlying aludraGUI with the default value for the task completion timeout.
 E waitingUntilTaskCompletion(int waitTime)
          Sets the #taskCompletionTimeout to the specified value.
 

Method Detail

getLocator

GUIElementLocator getLocator()
Returns:
the element's locator

waitingUntilTaskCompletion

E waitingUntilTaskCompletion()
Activates the waiting until task completion feature on the underlying aludraGUI with the default value for the task completion timeout.

Returns:
This object.

waitingUntilTaskCompletion

E waitingUntilTaskCompletion(int waitTime)
Sets the #taskCompletionTimeout to the specified value.

Parameters:
waitTime - the wait time to apply. A negative number disables the wait feature, 0 implicitly activates the AludraGUI's default, a positive value is used as explicit timeout.
Returns:
This object.

assertPresent

void assertPresent()
Asserts that the element is present


assertNotPresent

void assertNotPresent()
Asserts that the element is not present


assertVisible

void assertVisible()
Asserts that the element is visible


assertEnabled

void assertEnabled()
Asserts that this element is enabled, i.e. does not have an active "disabled" state.


assertNotEnabled

void assertNotEnabled()
Asserts that this element is not enabled, i.e. has an active "disabled" state.


assertFocus

void assertFocus()
Asserts that the element has the focus.


focus

void focus()
Sets the focus on this element


doubleClick

void doubleClick()
Double clicks the element.


click

void click()
Single-clicks the element.


click

void click(String click)
Selectable click- clicks only when provided string is not null, not marked as null and provided string is "true"

Parameters:
click - -String

isPresent

boolean isPresent()
Checks if the specified element is somewhere on the page within the standard timeout.

Returns:
true if the element was found present somewhere on the page within the standard timeout, false otherwise.

isPresentAndInForeground

boolean isPresentAndInForeground()
Checks if the specified element is somewhere on the page and in foreground within the standard timeout.

Returns:
true if the element was found present somewhere on the page and in foreground within the standard timeout, false otherwise.

isPresent

boolean isPresent(long timeout)
Checks if the specified element is somewhere on the page within a given timeout

Parameters:
timeout - max time to wait for the element to become present.
Returns:
true if the element was found present somewhere on the page within the given timeout, false otherwise.

isNotPresent

boolean isNotPresent()
Checks if the specified element is nowhere on the page within the standard timeout.

Returns:
true if the element was not found present somewhere on the page within the standard timeout, false otherwise.

isNotPresent

boolean isNotPresent(long timeout)
Checks if the specified element is nowhere on the page within the standard timeout.

Parameters:
timeout - time to check for the element not being present.
Returns:
true if the element was not found present somewhere on the page within the given timeout, false otherwise.

isVisible

boolean isVisible()
Checks if the specified element is visible within the standard timeout.

Returns:
true if the element is visible, false otherwise.

isVisible

boolean isVisible(long timeout)
Checks if the specified element is visible within the given timeout.

Parameters:
timeout - Max time to wait for the element to become visible.
Returns:
true if the element was found visible during the given timeout, false otherwise.

isEnabled

boolean isEnabled()
Checks whether this input element is enabled.

Returns:
true if the input element is enabled, false otherwise.

isEnabled

boolean isEnabled(long timeout)
Checks whether this input element is enabled.

Parameters:
timeout - Max time to wait for this input element to become enabled.
Returns:
true if the input element is enabled, false otherwise.


Copyright © 2015 aludratest.org. All rights reserved.