The attribute value of the given attribute name of this element, wrapped in a Some
, or None
if no
such attribute exists on this Element
.
The attribute value of the given attribute name of this element, wrapped in a Some
, or None
if no
such attribute exists on this Element
.
This method invokes getAttribute
on the underlying WebElement
, passing in the
specified name
.
the attribute with the given name, wrapped in a Some
, else None
Returns the first child Element
selected by the provided query, or throws TestFailedException
if no Element
is selected.
Returns the first child Element
selected by the provided query, or throws TestFailedException
if no Element
is selected.
The class of the Element
returned will be a subtype of Element
if appropriate.
For example, if this query selects a text field, the class of the returned Element
will
be TextField
.
the Query
used to lookup the child element
the child Element
selected by the provided query
if nothing is selected by the provided query
Returns the first WebElement
selected by the provided query, or throws TestFailedException
if no WebElement
is selected.
Returns the first WebElement
selected by the provided query, or throws TestFailedException
if no WebElement
is selected.
the Query
used to lookup the child element
the child WebElement
selected by the provided query
if nothing is selected by the provided query
Clears this field.
Clears this field.
Returns the result of invoking equals
on the underlying Element
, passing
in the specified other
object.
Returns the result of invoking equals
on the underlying Element
, passing
in the specified other
object.
the object with which to compare for equality
true if the passed object is equal to this one
Returns an Iterator
over all child Element
s selected by the provided query.
Returns an Iterator
over all child Element
s selected by the provided query.
The class of the Element
s produced by the returned Iterator
will be a
subtypes of Element
if appropriate. For example, if an Element
representing
a text field is returned by the Iterator
, the class of the returned Element
will
be TextField
.
If no Elements
are selected by the provided query, this method will return an empty Iterator
will be returned.
the Query
used to lookup the child elements
the Iterator
over all Element
s selected by the provided query
Returns the first child Element
selected by the provided query, wrapped in a Some
, or None
if no Element
is selected.
Returns the first child Element
selected by the provided query, wrapped in a Some
, or None
if no Element
is selected.
The class of the Element
returned will be a subtype of Element
if appropriate.
For example, if this query selects a text field, the class of the returned Element
will
be TextField
.
the Query
used to lookup the child element
the child Element
selected by the provided query, wrapped in a Some
, or None
if
no Element
is selected
Returns the result of invoking hashCode
on the underlying Element
.
Returns the result of invoking hashCode
on the underlying Element
.
a hash code for this object
Indicates whether this Element
is displayed.
Indicates whether this Element
is displayed.
This invokes isDisplayed
on the underlying WebElement
.
true
if the element is currently displayed
Indicates whether this Element
is enabled.
Indicates whether this Element
is enabled.
This invokes isEnabled
on the underlying WebElement
, which
will generally return true
for everything but disabled input elements.
true
if the element is currently enabled
Indicates whether this Element
is selected.
Indicates whether this Element
is selected.
This method, which invokes isSelected
on the underlying WebElement
,
is relevant only for input elements such as checkboxes, options in a single- or multiple-selection
list box, and radio buttons. For any other element it will simply return false
.
true
if the element is currently selected or checked
The XY location of the top-left corner of this Element
.
The XY location of the top-left corner of this Element
.
This invokes getLocation
on the underlying WebElement
.
the location of the top-left corner of this element on the page
The width/height size of this Element
.
The width/height size of this Element
.
This invokes getSize
on the underlying WebElement
.
the size of the element on the page
The tag name of this element.
The tag name of this element.
This method invokes getTagName
on the underlying WebElement
.
Note it returns the name of the tag, not the value of the of the name
attribute.
For example, it will return will return "input"
for the element
<input name="city" />
, not "city"
.
the tag name of this element
Returns the visible (i.e., not hidden by CSS) text of this element, including sub-elements, without any leading or trailing whitespace.
Returns the visible (i.e., not hidden by CSS) text of this element, including sub-elements, without any leading or trailing whitespace.
the visible text enclosed by this element, or an empty string, if the element encloses no visible text
Returns the result of invoking toString
on the underlying Element
.
Returns the result of invoking toString
on the underlying Element
.
a string representation of this object
the WebElement
representing a datetime field
the WebElement
representing a datetime field
Gets this field's value.
Gets this field's value.
This method invokes getAttribute("value")
on the underlying WebElement
.
the field's value
Sets this field's value.
This class is part of ScalaTest's Selenium DSL. Please see the documentation for
WebBrowser
for an overview of the Selenium DSL.This class enables syntax such as the following:
if the passed
WebElement
does not represent a datetime field