org.scalatestplus.selenium.WebBrowser

Element

sealed trait Element extends AnyRef

Wrapper class for a Selenium WebElement.

This class provides idiomatic Scala access to the services of an underlying WebElement. You can access the wrapped WebElement via the underlying method.

Source
WebBrowser.scala
Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Element
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract val underlying: WebElement

    The underlying WebElement wrapped by this Element

    The underlying WebElement wrapped by this Element

Concrete Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def attribute(name: String): Option[String]

    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.

    returns

    the attribute with the given name, wrapped in a Some, else None

  8. def childElement(query: Query)(implicit pos: Position = implicitly[source.Position]): Element

    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.

    query

    the Query used to lookup the child element

    returns

    the child Element selected by the provided query

    Exceptions thrown
    TestFailedException

    if nothing is selected by the provided query

  9. def childWebElement(query: Query)(implicit pos: Position = implicitly[source.Position]): WebElement

    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.

    query

    the Query used to lookup the child element

    returns

    the child WebElement selected by the provided query

    Exceptions thrown
    TestFailedException

    if nothing is selected by the provided query

  10. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  11. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  12. def equals(other: Any): Boolean

    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.

    other

    the object with which to compare for equality

    returns

    true if the passed object is equal to this one

    Definition Classes
    Element → AnyRef → Any
  13. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. def findAllChildElements(query: Query)(implicit pos: Position = implicitly[source.Position]): Iterator[Element]

    Returns an Iterator over all child Elements selected by the provided query.

    Returns an Iterator over all child Elements selected by the provided query.

    The class of the Elements produced by the returned Iterator will be a subtypes of Element if appropriate. For example, if an Elementrepresenting 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.

    query

    the Query used to lookup the child elements

    returns

    the Iterator over all Elements selected by the provided query

  15. def findChildElement(query: Query)(implicit pos: Position = implicitly[source.Position]): Option[Element]

    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.

    query

    the Query used to lookup the child element

    returns

    the child Element selected by the provided query, wrapped in a Some, or None if no Element is selected

  16. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  17. def hashCode(): Int

    Returns the result of invoking hashCode on the underlying Element.

    Returns the result of invoking hashCode on the underlying Element.

    returns

    a hash code for this object

    Definition Classes
    Element → AnyRef → Any
  18. def isDisplayed: Boolean

    Indicates whether this Element is displayed.

    Indicates whether this Element is displayed.

    This invokes isDisplayed on the underlying WebElement.

    returns

    true if the element is currently displayed

  19. def isEnabled: Boolean

    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.

    returns

    true if the element is currently enabled

  20. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  21. def isSelected: Boolean

    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.

    returns

    true if the element is currently selected or checked

  22. def location: Point

    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.

    returns

    the location of the top-left corner of this element on the page

  23. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  24. final def notify(): Unit

    Definition Classes
    AnyRef
  25. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  26. def size: Dimension

    The width/height size of this Element.

    The width/height size of this Element.

    This invokes getSize on the underlying WebElement.

    returns

    the size of the element on the page

  27. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  28. def tagName: String

    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".

    returns

    the tag name of this element

  29. def text: String

    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.

    returns

    the visible text enclosed by this element, or an empty string, if the element encloses no visible text

  30. def toString(): String

    Returns the result of invoking toString on the underlying Element.

    Returns the result of invoking toString on the underlying Element.

    returns

    a string representation of this object

    Definition Classes
    Element → AnyRef → Any
  31. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  33. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped