com.atlassian.pageobjects.elements
Interface TimedElement

All Known Implementing Classes:
WebDriverTimedElement

public interface TimedElement

Represents an HTML element that is expected in the DOM of a page, all queries return TimedQueries.


Method Summary
 TimedQuery<String> getAttribute(String name)
          Query representing the element's given attribute.
 TimedQuery<org.openqa.selenium.Point> getLocation()
          Timed query representing the location of the element on the page.
 TimedQuery<org.openqa.selenium.Dimension> getSize()
          Timed query representing the dimension of the element.
 TimedQuery<String> getTagName()
          Query representing the element's tag name
 TimedQuery<String> getText()
          Query representing the element's inner text.
 TimedQuery<String> getValue()
          Query representing the element's 'value' attribute
 TimedCondition hasAttribute(String name, String value)
          Query representing whether this element has the given attribute set
 TimedCondition hasClass(String className)
          Query representing whether this element has the given classname set.
 TimedCondition hasText(String text)
          Query representing whether this element's innerText is equal to the provided string.
 TimedCondition hasValue(String value)
          Query representing whether this element's value attribute is equal to the provided string.
 TimedCondition isEnabled()
          Query representing whether this element is enabled on a page.
 TimedCondition isPresent()
          Query representing the existence of this element on a page.
 TimedCondition isSelected()
          Query representing whether this element is selected on a page.
 TimedCondition isVisible()
          Query representing visibility of this element on a page.
 

Method Detail

isPresent

TimedCondition isPresent()
Query representing the existence of this element on a page.

Returns:
TimedQuery that true if element is present on the page, false if element is not visible or timeout expires.

isVisible

TimedCondition isVisible()
Query representing visibility of this element on a page.

Returns:
TimedQuery that returns true if element is visible on the page, false if element is not visible or timeout expires.

isEnabled

TimedCondition isEnabled()
Query representing whether this element is enabled on a page.

Returns:
TimedQuery that returns true if element is enabled on the page, false if element is disabled or timeout expires.

isSelected

TimedCondition isSelected()
Query representing whether this element is selected on a page.

Returns:
TimedQuery that returns true if element is selected on the page, false if element is not selected or timeout expires.

hasClass

TimedCondition hasClass(String className)
Query representing whether this element has the given classname set.

Parameters:
className - The name of the class to check
Returns:
TimedQuery that returns true if element has given classname set, false if element does not have the given classname set or timeout expires.

getAttribute

TimedQuery<String> getAttribute(String name)
Query representing the element's given attribute.

Parameters:
name - Name of the attribute
Returns:
TimedQuery that returns the value of the given attribute, null if element does not have given attribute or timeout expires.

hasAttribute

TimedCondition hasAttribute(String name,
                            String value)
Query representing whether this element has the given attribute set

Parameters:
name - Name of the attribute
value - expected attribute value
Returns:
TimedQuery that returns true if element has given attribute set, false if element does not have the given attribute set or timeout expires

getText

TimedQuery<String> getText()
Query representing the element's inner text.

Returns:
TimedQuery that returns the inner text of the element, null if element does not have inner text or timeout expires.

hasText

TimedCondition hasText(String text)
Query representing whether this element's innerText is equal to the provided string.

Parameters:
text - The expected innerText string
Returns:
timed condition that returns true if this element has given innerText equal to expected, false otherwise

getTagName

TimedQuery<String> getTagName()
Query representing the element's tag name

Returns:
TimedQuery that returns the tagname of the element

getValue

TimedQuery<String> getValue()
Query representing the element's 'value' attribute

Returns:
TimedQuery that returns the value of the 'value' attribute, null if element does not have a 'value' attribute or timeout expires.

hasValue

TimedCondition hasValue(String value)
Query representing whether this element's value attribute is equal to the provided string.

Parameters:
value - The expected value attribute
Returns:
timed condition that returns true if this element has given value attribute equal to expected, false otherwise

getLocation

TimedQuery<org.openqa.selenium.Point> getLocation()
Timed query representing the location of the element on the page.

Returns:
query for location of the element on the page. Returns null, if the element cannot be located by given timeout

getSize

TimedQuery<org.openqa.selenium.Dimension> getSize()
Timed query representing the dimension of the element.

Returns:
query for dimension of the element on the page. Returns null, if the element cannot be located by given timeout


Copyright © 2014 Atlassian. All rights reserved.