org.scalatest.selenium.WebBrowser

Query

sealed trait Query extends AnyRef

This trait is part of ScalaTest's Selenium DSL. Please see the documentation for WebBrowser for an overview of the Selenium DSL.

Subclasses of this trait define different ways of querying for elements, enabling syntax such as the following:

click on id("q")
         ^

Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Query
  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 by: By

    The Selenium By for this query.

  2. abstract val queryString: String

    The query string for this query.

    The query string for this query.

    For example, the query string for id("q") is "q".

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 clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  8. def element(implicit driver: WebDriver): Element

    Returns the first Element selected by this query, or throws TestFailedException if no Element is selected.

    Returns the first Element selected by this 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.

    driver

    the WebDriver with which to drive the browser

    returns

    the Element selected by this query

    Exceptions thrown
    TestFailedException

    if nothing is selected by this query

  9. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean

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

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  12. def findAllElements(implicit driver: WebDriver): Iterator[Element]

    Returns an Iterator over all Elements selected by this query.

    Returns an Iterator over all Elements selected by this 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 this query, this method will return an empty Iterator will be returned.

    driver

    the WebDriver with which to drive the browser

    returns

    the Iterator over all Elements selected by this query

  13. def findElement(implicit driver: WebDriver): Option[Element]

    Returns the first Element selected by this query, wrapped in a Some, or None if no Element is selected.

    Returns the first Element selected by this 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.

    driver

    the WebDriver with which to drive the browser

    returns

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

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

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

    Definition Classes
    AnyRef → Any
  16. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  17. final def ne(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef
  20. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  21. def toString(): String

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws()
  25. def webElement(implicit driver: WebDriver): WebElement

    Returns the first WebElement selected by this query, or throws TestFailedException if no WebElement is selected.

    Returns the first WebElement selected by this query, or throws TestFailedException if no WebElement is selected.

    driver

    the WebDriver with which to drive the browser

    returns

    the WebElement selected by this query

    Exceptions thrown
    TestFailedException

    if nothing is selected by this query

Inherited from AnyRef

Inherited from Any

Ungrouped