@PublicApi public interface PageElement extends PageElementFinder, PageElementSearch
| Modifier and Type | Method and Description |
|---|---|
PageElement |
clear()
Clear the value of the text entry element.
|
PageElement |
click()
Click this element
|
PageElement |
find(org.openqa.selenium.By locator)
Returns an element that will match the given locator within this element.
|
List<PageElement> |
findAll(org.openqa.selenium.By locator)
Returns a list of element's that match the given locator within this element
|
String |
getAttribute(String name)
Get the value of the given attribute of this element.
|
Set<String> |
getCssClasses()
Get a set of CSS classes associated with this element.
|
String |
getId() |
org.openqa.selenium.Point |
getLocation()
Location of this element on the page (top-left corner)
|
org.openqa.selenium.Dimension |
getSize()
Dimension of this element on the page
|
String |
getTagName()
Get the tag name of this element
|
String |
getText()
Get the visible innerText of this element, including sub-elements, without any leading or trailing whitespaces.
|
String |
getValue()
Get the value of this element's "value" attribute.
|
boolean |
hasAttribute(String name,
String value)
Whether this element has an attribute set to a specific value
|
boolean |
hasClass(String className)
Whether this element has the given class set
|
boolean |
isEnabled()
Whether this element is enabled on the page
|
boolean |
isPresent()
Whether this element is currently on the DOM of the page
|
boolean |
isSelected()
Whether this element is selected on the page.
|
boolean |
isVisible()
Whether this element is visible on the page
|
PageElementJavascript |
javascript()
Gets a PageElementJavascript for this element
|
PageElement |
select()
Select an element.
|
TimedElement |
timed()
Creates a timed element based on this element's locator.
|
PageElement |
toggle()
If the element is a checkbox this will toggle the elements state from selected to not selected, or from not selected to selected.
|
PageElement |
type(CharSequence... keys)
Simulate typing into this element.
|
PageElement |
withTimeout(TimeoutType timeoutType)
Returns an instance equivalent to this element, with a changed timeoutType.
|
find, find, find, findAll, findAll, findAllsearchboolean isPresent()
boolean isVisible()
boolean isEnabled()
boolean isSelected()
true if the checkbox is checked.
For radio buttons, returns true
if the radio button this class represents is selected.true if this element is selected, false otherwise.@Nullable String getId()
null if the "id" attribute is not defined@Nonnull Set<String> getCssClasses()
boolean hasClass(@Nonnull String className)
className - The name of the class to check@Nullable String getAttribute(@Nonnull String name)
name - The name of the attribute.boolean hasAttribute(@Nonnull String name, @Nullable String value)
name - The attribute namevalue - The expected value@Nullable String getText()
@Nullable String getValue()
@Nonnull org.openqa.selenium.Point getLocation()
@Nonnull org.openqa.selenium.Dimension getSize()
@Nonnull PageElement click()
@Nonnull PageElement type(CharSequence... keys)
keys - keys to type@Nonnull PageElement select()
@Nonnull PageElement toggle()
@Nonnull PageElement clear()
@Nonnull List<PageElement> findAll(@Nonnull org.openqa.selenium.By locator)
findAll in interface PageElementFinderlocator - The locator mecharnism@Nonnull PageElement find(@Nonnull org.openqa.selenium.By locator)
isPresent()
to check whether a corresponding element on the page actually exists.find in interface PageElementFinderlocator - The locator mechanism@Nonnull TimedElement timed()
@Nonnull PageElementJavascript javascript()
@Nonnull PageElement withTimeout(@Nonnull TimeoutType timeoutType)
timeoutType - new timeoutCopyright © 2015 Atlassian. All rights reserved.