org.scalatest.selenium

Chrome

trait Chrome extends WebBrowser with ScreenshotCapturer

WebBrowser subtrait that defines an implicit WebDriver for Chrome (an org.openqa.selenium.chrome.ChromeDriver).

Linear Supertypes
ScreenshotCapturer, WebBrowser, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. Chrome
  2. ScreenshotCapturer
  3. WebBrowser
  4. AnyRef
  5. Any
Visibility
  1. Public
  2. All

Type Members

  1. class ActiveElementTarget extends SwitchTarget[Element]

    This class supports switching to the currently active element in ScalaTest's Selenium DSL.

  2. class AlertTarget extends SwitchTarget[Alert]

    This class supports switching to the alert box in ScalaTest's Selenium DSL.

  3. class Checkbox extends Element

    This class is part of ScalaTest's Selenium DSL.

  4. case class ClassNameQuery (queryString: String) extends Query with Product with Serializable

    A class name query.

  5. class CookiesNoun extends AnyRef

    This class is part of the ScalaTest's Selenium DSL.

  6. case class CssSelectorQuery (queryString: String) extends Query with Product with Serializable

    A CSS selector query.

  7. class DefaultContentTarget extends SwitchTarget[WebDriver]

    This class supports switching to the default content in ScalaTest's Selenium DSL.

  8. case class Dimension (width: Int, height: Int) extends Product with Serializable

    A dimension containing the width and height of a screen element.

  9. trait Element extends AnyRef

    Wrapper class for a Selenium WebElement.

  10. class FrameElementTarget extends SwitchTarget[WebDriver]

    This class supports switching to a frame by element in ScalaTest's Selenium DSL.

  11. class FrameIndexTarget extends SwitchTarget[WebDriver]

    This class supports switching to a frame by index in ScalaTest's Selenium DSL.

  12. class FrameNameOrIdTarget extends SwitchTarget[WebDriver]

    This class supports switching to a frame by name or ID in ScalaTest's Selenium DSL.

  13. class FrameWebElementTarget extends SwitchTarget[WebDriver]

    This class supports switching to a frame by web element in ScalaTest's Selenium DSL.

  14. case class IdQuery (queryString: String) extends Query with Product with Serializable

    An ID query.

  15. case class LinkTextQuery (queryString: String) extends Query with Product with Serializable

    A link text query.

  16. class MultiSel extends Element

    This class is part of ScalaTest's Selenium DSL.

  17. class MultiSelOptionSeq extends IndexedSeq[String]

    This class is part of ScalaTest's Selenium DSL.

  18. case class NameQuery (queryString: String) extends Query with Product with Serializable

    A name query.

  19. trait Page extends AnyRef

    Trait that facilitates using the page object pattern with the ScalaTest Selenium DSL.

  20. case class PartialLinkTextQuery (queryString: String) extends Query with Product with Serializable

    A partial link text query.

  21. case class Point (x: Int, y: Int) extends Product with Serializable

    A point containing an XY screen location.

  22. trait Query extends AnyRef

    This trait is part of ScalaTest's Selenium DSL.

  23. class RadioButton extends Element

    This class is part of ScalaTest's Selenium DSL.

  24. class RadioButtonGroup extends AnyRef

    This class is part of ScalaTest's Selenium DSL.

  25. class SingleSel extends Element

    This class is part of ScalaTest's Selenium DSL.

  26. class SwitchTarget [T] extends AnyRef

    This sealed abstract class supports switching in ScalaTest's Selenium DSL.

  27. case class TagNameQuery (queryString: String) extends Query with Product with Serializable

    A tag name query.

  28. class TextArea extends Element

    This class is part of ScalaTest's Selenium DSL.

  29. class TextField extends Element

    This class is part of ScalaTest's Selenium DSL.

  30. class WindowTarget extends SwitchTarget[WebDriver]

    This class supports switching to a window by name or handle in ScalaTest's Selenium DSL.

  31. class WrappedCookie extends AnyRef

    Wrapper class for a Selenium Cookie.

  32. case class XPathQuery (queryString: String) extends Query with Product with Serializable

    An XPath query.

Value Members

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

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

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

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

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

    Attributes
    final
    Definition Classes
    Any
  6. val activeElement : ActiveElementTarget

    This value supports switching to the currently active element in ScalaTest's Selenium DSL.

    This value supports switching to the currently active element in ScalaTest's Selenium DSL. Please see the documentation for WebBrowser for an overview of the Selenium DSL.

    This class is enables the following syntax:

    switch to activeElement
              ^
    

    Definition Classes
    WebBrowser
  7. object add extends AnyRef

    This object is part of ScalaTest's Selenium DSL.

  8. def addCookie (name: String, value: String, path: String = "/", expiry: Date = null, domain: String = null, secure: Boolean = false)(implicit driver: WebDriver): Unit

    Add cookie in the web browser.

    Add cookie in the web browser. If the cookie's domain name is left blank (default), it is assumed that the cookie is meant for the domain of the current document.

    name

    cookie's name

    value

    cookie's value

    path

    cookie's path

    expiry

    cookie's expiry data

    domain

    cookie's domain name

    secure

    whether this cookie is secured.

    driver

    the WebDriver with which to drive the browser

    Definition Classes
    WebBrowser
  9. val alert : AlertTarget

    This value supports switching to the alert box in ScalaTest's Selenium DSL.

    This value supports switching to the alert box in ScalaTest's Selenium DSL. Please see the documentation for WebBrowser for an overview of the Selenium DSL.

    This class is enables the following syntax:

    switch to alert
              ^
    

    Definition Classes
    WebBrowser
  10. def asInstanceOf [T0] : T0

    Attributes
    final
    Definition Classes
    Any
  11. object capture extends AnyRef

    This object is part of ScalaTest's Selenium DSL.

  12. def captureScreenshot (directory: String): Unit

    Captures a screenshot and saves it as a file in the specified directory.

    Captures a screenshot and saves it as a file in the specified directory.

    Definition Classes
    Chrome → ScreenshotCapturer
  13. def captureTo (fileName: String)(implicit driver: WebDriver): Unit

    Capture screenshot and save it as the specified name (if file name does not end with .

    Capture screenshot and save it as the specified name (if file name does not end with .png, it will be extended automatically) in capture directory, which by default is system property's java.io.tmpdir. You can change capture directory by calling setCaptureDir

    fileName

    screenshot file name, if does not end with .png, it will be extended automatically

    Definition Classes
    WebBrowser
  14. def checkbox (queryString: String)(implicit driver: WebDriver): Checkbox

    Finds and returns the first Checkbox selected by the specified string ID or name, throws TestFailedException if element not found or the found element is not a Checkbox.

    Finds and returns the first Checkbox selected by the specified string ID or name, throws TestFailedException if element not found or the found element is not a Checkbox.

    queryString

    the string with which to search, first by ID then by name

    driver

    the WebDriver with which to drive the browser

    returns

    the Checkbox selected by this query

    Definition Classes
    WebBrowser
  15. def checkbox (query: Query)(implicit driver: WebDriver): Checkbox

    Finds and returns the first Checkbox selected by the specified Query, throws TestFailedException if element not found or the found element is not a Checkbox.

    Finds and returns the first Checkbox selected by the specified Query, throws TestFailedException if element not found or the found element is not a Checkbox.

    query

    the Query with which to search

    driver

    the WebDriver with which to drive the browser

    returns

    the Checkbox selected by this query

    Definition Classes
    WebBrowser
  16. def className (className: String): ClassNameQuery

    Returns a class name query.

    Returns a class name query.

    This method enables syntax such as the following:

    click on className("???")
             ^
    

    Definition Classes
    WebBrowser
  17. object click extends AnyRef

    This object is part of ScalaTest's Selenium DSL.

  18. def clickOn (element: Element): Unit

    Click on the specified Element

    Click on the specified Element

    element

    the Element to click on

    Definition Classes
    WebBrowser
  19. def clickOn (queryString: String)(implicit driver: WebDriver): Unit

    Click on the first Element selected by the specified string ID or name

    Click on the first Element selected by the specified string ID or name

    queryString

    the string with which to search, first by ID then by name

    driver

    the WebDriver with which to drive the browser

    Definition Classes
    WebBrowser
  20. def clickOn (query: Query)(implicit driver: WebDriver): Unit

    Click on the first Element selected by the specified Query

    Click on the first Element selected by the specified Query

    query

    the Query with which to search

    driver

    the WebDriver with which to drive the browser

    Definition Classes
    WebBrowser
  21. def clickOn (element: WebElement): Unit

    Click on the specified WebElement

    Click on the specified WebElement

    element

    the WebElement to click on

    Definition Classes
    WebBrowser
  22. def clone (): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  23. def close ()(implicit driver: WebDriver): Unit

    Closes the current browser window, and exits the driver if the current window was the only one remaining.

    Closes the current browser window, and exits the driver if the current window was the only one remaining.

    driver

    the WebDriver with which to drive the browser

    Definition Classes
    WebBrowser
  24. def cookie (name: String)(implicit driver: WebDriver): WrappedCookie

    Get a saved cookie from web browser, throws TestFailedException if the cookie does not exist.

    Get a saved cookie from web browser, throws TestFailedException if the cookie does not exist.

    name

    cookie's name

    returns

    a WrappedCookie instance

    Definition Classes
    WebBrowser
  25. val cookies : CookiesNoun

    This field supports cookie deletion in ScalaTest's Selenium DSL.

    This field supports cookie deletion in ScalaTest's Selenium DSL. Please see the documentation for WebBrowser for an overview of the Selenium DSL.

    This field enables the following syntax:

    delete all cookies
               ^
    

    Definition Classes
    WebBrowser
  26. def cssSelector (cssSelector: String): CssSelectorQuery

    Returns a CSS selector query.

    Returns a CSS selector query.

    This method enables syntax such as the following:

    click on cssSelector("???")
             ^
    

    Definition Classes
    WebBrowser
  27. def currentUrl (implicit driver: WebDriver): String

    Returns the URL of the current page.

    Returns the URL of the current page.

    This method invokes getCurrentUrl on the passed WebDriver and returns the result.

    driver

    the WebDriver with which to drive the browser

    returns

    the URL of the current page

    Definition Classes
    WebBrowser
  28. val defaultContent : DefaultContentTarget

    This value supports switching to the default content in ScalaTest's Selenium DSL.

    This value supports switching to the default content in ScalaTest's Selenium DSL. Please see the documentation for WebBrowser for an overview of the Selenium DSL.

    This class is enables the following syntax:

    switch to defaultContent
              ^
    

    Definition Classes
    WebBrowser
  29. object delete extends AnyRef

    This object is part of ScalaTest's Selenium DSL.

  30. def deleteAllCookies ()(implicit driver: WebDriver): Unit

    Delete all cookies in the current domain from web browser.

    Delete all cookies in the current domain from web browser.

    driver

    the WebDriver with which to drive the browser

    Definition Classes
    WebBrowser
  31. def deleteCookie (name: String)(implicit driver: WebDriver): Unit

    Delete cookie with the specified name from web browser, throws TestFailedException if the specified cookie does not exists.

    Delete cookie with the specified name from web browser, throws TestFailedException if the specified cookie does not exists.

    name

    cookie's name

    driver

    the WebDriver with which to drive the browser

    Definition Classes
    WebBrowser
  32. def enter (value: String)(implicit driver: WebDriver): Unit

    Clears the current active TextField or TextArea, and presses the passed keys.

    Clears the current active TextField or TextArea, and presses the passed keys. Throws TestFailedException if current active is not TextField or TextArea.

    value

    keys to press in current active TextField or TextArea

    Definition Classes
    WebBrowser
  33. def eq (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  34. def equals (arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  35. def executeAsyncScript (script: String, args: AnyRef*)(implicit driver: WebDriver): AnyRef

    Executes an asynchronous piece of JavaScript in the context of the currently selected frame or window.

    Executes an asynchronous piece of JavaScript in the context of the currently selected frame or window. Unlike executing synchronous JavaScript, scripts executed with this method must explicitly signal they are finished by invoking the provided callback. This callback is always injected into the executed function as the last argument.

    The first argument passed to the callback function will be used as the script's result. This value will be handled as follows:

    • For an HTML element, this method returns a WebElement
    • For a number, a Long is returned
    • For a boolean, a Boolean is returned
    • For all other cases, a String is returned
    • For an array, return a List<Object> with each object following the rules above. We support nested lists
    • Unless the value is null or there is no return value, in which null is returned

    Script arguments must be a number, a boolean, a String, WebElement, or a List of any combination of the above. An exception will be thrown if the arguments do not meet these criteria. The arguments will be made available to the JavaScript via the "arguments" variable.

    script

    the JavaScript to execute

    args

    the arguments to the script, may be empty

    returns

    One of Boolean, Long, String, List, WebElement, or null

    Definition Classes
    WebBrowser
  36. def executeScript [T] (script: String, args: AnyRef*)(implicit driver: WebDriver): AnyRef

    Executes JavaScript in the context of the currently selected frame or window.

    Executes JavaScript in the context of the currently selected frame or window. The script fragment provided will be executed as the body of an anonymous function.

    Within the script, you can use document to refer to the current document. Local variables will not be available once the script has finished executing, but global variables will.

    To return a value (e.g. if the script contains a return statement), then the following steps will be taken:

    • For an HTML element, this method returns a WebElement
    • For a decimal, a Double is returned
    • For a non-decimal number, a Long is returned
    • For a boolean, a Boolean is returned
    • For all other cases, a String is returned
    • For an array, return a List<Object> with each object following the rules above. We support nested lists
    • Unless the value is null or there is no return value, in which null is returned
    script

    the JavaScript to execute

    args

    the arguments to the script, may be empty

    returns

    One of Boolean, Long, String, List or WebElement. Or null

    Definition Classes
    WebBrowser
  37. def finalize (): Unit

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  38. def find (queryString: String)(implicit driver: WebDriver): Option[Element]

    Finds and returns the first element selected by the specified string ID or name, wrapped in a Some, or None if no element is selected.

    Finds and returns the first element selected by the specified string ID or name, wrapped in a Some, or None if no element is selected. YYY

    This method will try to lookup by id first. If it cannot find any element with an id equal to the specified queryString, it will then try lookup by name.

    The class of the Element returned will be a subtype of Element if appropriate. For example, if the query selects a text field, the class of the returned Element will be TextField.

    queryString

    the string with which to search, first by ID then by name

    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

    Definition Classes
    WebBrowser
  39. def find (query: Query)(implicit driver: WebDriver): Option[Element]

    Finds and returns the first element selected by the specified Query, wrapped in a Some, or None if no element is selected.

    Finds and returns the first element selected by the specified 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 the query selects a text field, the class of the returned Element will be TextField.

    query

    the Query with which to search

    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

    Definition Classes
    WebBrowser
  40. def findAll (queryString: String)(implicit driver: WebDriver): Iterator[Element]

    Returns an Iterator over all Elements selected by the specified string ID or name

    Returns an Iterator over all Elements selected by the specified string ID or name

    This method will try to lookup by id first. If it cannot find any element with an id equal to the specified queryString, it will then try lookup by name.

    The class of the Element returned will be a subtype of Element if appropriate. For example, if the query selects a text field, the class of the returned Element will be TextField.

    queryString

    the string with which to search, first by ID then by name

    driver

    the WebDriver with which to drive the browser

    returns

    the Iterator over all Elements selected by this query

    Definition Classes
    WebBrowser
  41. def findAll (query: Query)(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.

    query

    the Query with which to search

    driver

    the WebDriver with which to drive the browser

    returns

    the Iterator over all Elements selected by this query

    Definition Classes
    WebBrowser
  42. def frame (query: Query)(implicit driver: WebDriver): FrameWebElementTarget

    This method supports switching to a frame by Query in ScalaTest's Selenium DSL.

    This method supports switching to a frame by Query in ScalaTest's Selenium DSL. Please see the documentation for WebBrowser for an overview of the Selenium DSL.

    query

    Query used to select WebElement which is contained in the frame to switch to

    returns

    a FrameWebElementTarget instance

    Definition Classes
    WebBrowser
  43. def frame (element: Element): FrameElementTarget

    This method supports switching to a frame by element in ScalaTest's Selenium DSL.

    This method supports switching to a frame by element in ScalaTest's Selenium DSL. Please see the documentation for WebBrowser for an overview of the Selenium DSL.

    element

    Element which is contained in the frame to switch to

    returns

    a FrameElementTarget instance

    Definition Classes
    WebBrowser
  44. def frame (element: WebElement): FrameWebElementTarget

    This method supports switching to a frame by web element in ScalaTest's Selenium DSL.

    This method supports switching to a frame by web element in ScalaTest's Selenium DSL. Please see the documentation for WebBrowser for an overview of the Selenium DSL.

    element

    WebElement which is contained in the frame to switch to

    returns

    a FrameWebElementTarget instance

    Definition Classes
    WebBrowser
  45. def frame (nameOrId: String): FrameNameOrIdTarget

    This method supports switching to a frame by name or ID in ScalaTest's Selenium DSL.

    This method supports switching to a frame by name or ID in ScalaTest's Selenium DSL. Please see the documentation for WebBrowser for an overview of the Selenium DSL.

    This class is enables the following syntax:

    switch to frame("name")
              ^
    

    nameOrId

    name or ID of the frame to switch to

    returns

    a FrameNameOrIdTarget instance

    Definition Classes
    WebBrowser
  46. def frame (index: Int): FrameIndexTarget

    This method supports switching to a frame by index in ScalaTest's Selenium DSL.

    This method supports switching to a frame by index in ScalaTest's Selenium DSL. Please see the documentation for WebBrowser for an overview of the Selenium DSL.

    This class is enables the following syntax:

    switch to frame(0)
              ^
    

    index

    the index of frame to switch to

    returns

    a FrameIndexTarget instance

    Definition Classes
    WebBrowser
  47. def getClass (): java.lang.Class[_]

    Attributes
    final
    Definition Classes
    AnyRef
  48. object go extends AnyRef

    This object is part of ScalaTest's Selenium DSL.

  49. def goBack ()(implicit driver: WebDriver): Unit

    Go back to previous page.

    Go back to previous page.

    driver

    the WebDriver with which to drive the browser

    Definition Classes
    WebBrowser
  50. def goForward ()(implicit driver: WebDriver): Unit

    Go forward to next page.

    Go forward to next page.

    driver

    the WebDriver with which to drive the browser

    Definition Classes
    WebBrowser
  51. def goTo (page: Page)(implicit driver: WebDriver): Unit

    Sends the browser to the URL contained in the passed Page object.

    Sends the browser to the URL contained in the passed Page object.

    Here's an example:

    goTo(homePage)
    

    page

    the Page object containing the URL to which to send the browser

    driver

    the WebDriver with which to drive the browser

    Definition Classes
    WebBrowser
  52. def goTo (url: String)(implicit driver: WebDriver): Unit

    Sends the browser to the passed URL.

    Sends the browser to the passed URL.

    Here's an example:

    goTo("http://www.artima.com")
    

    url

    the URL to which to send the browser

    driver

    the WebDriver with which to drive the browser

    Definition Classes
    WebBrowser
  53. def hashCode (): Int

    Definition Classes
    AnyRef → Any
  54. def id (elementId: String): IdQuery

    Returns an ID query.

    Returns an ID query.

    This method enables syntax such as the following:

    click on id("q")
             ^
    

    Definition Classes
    WebBrowser
  55. def implicitlyWait (timeout: Span)(implicit driver: WebDriver): Unit

    Sets the amount of time the driver should wait when searching for an element that is not immediately present.

    Sets the amount of time the driver should wait when searching for an element that is not immediately present.

    When searching for requested elements, Selenium will poll the page until the requested element (or at least one of multiple requested elements) is found or this "implicit wait" timeout has expired. If the timeout expires, Selenium will throw NoSuchElementException, which ScalaTest's Selenium DSL will wrap in a TestFailedException.

    You can alternatively set this timeout to zero and use ScalaTest's eventually construct.

    This method invokes manage.timeouts.implicitlyWait on the passed WebDriver. See the documentation of Selenium's WebDriver#Timeouts interface for more information.

    timeout

    the time span to implicitly wait

    driver

    the WebDriver on which to set the implicit wait

    Definition Classes
    WebBrowser
  56. def isInstanceOf [T0] : Boolean

    Attributes
    final
    Definition Classes
    Any
  57. def isScreenshotSupported (implicit driver: WebDriver): Boolean

    Check if screenshot is supported

    Check if screenshot is supported

    driver

    the WebDriver with which to drive the browser

    returns

    true if screenshot is supported, false otherwise

    Definition Classes
    WebBrowser
  58. def linkText (linkText: String): LinkTextQuery

    Returns a link text query.

    Returns a link text query.

    This method enables syntax such as the following:

    click on linkText("???")
             ^
    

    Definition Classes
    WebBrowser
  59. def multiSel (queryString: String)(implicit driver: WebDriver): MultiSel

    Finds and returns the first MultiSel selected by the specified string ID or name, throws TestFailedException if element not found or the found element is not a MultiSel.

    Finds and returns the first MultiSel selected by the specified string ID or name, throws TestFailedException if element not found or the found element is not a MultiSel.

    queryString

    the string with which to search, first by ID then by name

    driver

    the WebDriver with which to drive the browser

    returns

    the MultiSel selected by this query

    Definition Classes
    WebBrowser
  60. def multiSel (query: Query)(implicit driver: WebDriver): MultiSel

    Finds and returns the first MultiSel selected by the specified Query, throws TestFailedException if element not found or the found element is not a MultiSel.

    Finds and returns the first MultiSel selected by the specified Query, throws TestFailedException if element not found or the found element is not a MultiSel.

    query

    the Query with which to search

    driver

    the WebDriver with which to drive the browser

    returns

    the MultiSel selected by this query

    Definition Classes
    WebBrowser
  61. def name (elementName: String): NameQuery

    Returns a name query.

    Returns a name query.

    This method enables syntax such as the following:

    click on name("q")
             ^
    

    Definition Classes
    WebBrowser
  62. def ne (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  63. def notify (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  64. def notifyAll (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  65. def pageSource (implicit driver: WebDriver): String

    Returns the source of the current page.

    Returns the source of the current page.

    This method invokes getPageSource on the passed WebDriver and returns the result.

    driver

    the WebDriver with which to drive the browser

    returns

    the source of the current page

    Definition Classes
    WebBrowser
  66. def pageTitle (implicit driver: WebDriver): String

    Returns the title of the current page, or the empty string if the current page has no title.

    Returns the title of the current page, or the empty string if the current page has no title.

    driver

    the WebDriver with which to drive the browser

    returns

    the current page's title, or the empty string if the current page has no title

    Definition Classes
    WebBrowser
  67. def partialLinkText (partialLinkText: String): PartialLinkTextQuery

    Returns a partial link text query.

    Returns a partial link text query.

    This method enables syntax such as the following:

    click on partialLinkText("???")
             ^
    

    Definition Classes
    WebBrowser
  68. def pressKeys (value: String)(implicit driver: WebDriver): Unit

    Press the passed keys to current active element.

    Press the passed keys to current active element.

    value

    keys to press in current active element

    Definition Classes
    WebBrowser
  69. def quit ()(implicit driver: WebDriver): Unit

    Close all windows, and exit the driver.

    Close all windows, and exit the driver.

    driver

    the WebDriver on which to quit.

    Definition Classes
    WebBrowser
  70. def radioButton (queryString: String)(implicit driver: WebDriver): RadioButton

    Finds and returns the first RadioButton selected by the specified string ID or name, throws TestFailedException if element not found or the found element is not a RadioButton.

    Finds and returns the first RadioButton selected by the specified string ID or name, throws TestFailedException if element not found or the found element is not a RadioButton.

    queryString

    the string with which to search, first by ID then by name

    driver

    the WebDriver with which to drive the browser

    returns

    the RadioButton selected by this query

    Definition Classes
    WebBrowser
  71. def radioButton (query: Query)(implicit driver: WebDriver): RadioButton

    Finds and returns the first RadioButton selected by the specified Query, throws TestFailedException if element not found or the found element is not a RadioButton.

    Finds and returns the first RadioButton selected by the specified Query, throws TestFailedException if element not found or the found element is not a RadioButton.

    query

    the Query with which to search

    driver

    the WebDriver with which to drive the browser

    returns

    the RadioButton selected by this query

    Definition Classes
    WebBrowser
  72. def radioButtonGroup (groupName: String)(implicit driver: WebDriver): RadioButtonGroup

    Finds and returns RadioButtonGroup selected by the specified group name, throws TestFailedException if no element with the specified group name is found, or found any element with the specified group name but not a RadioButton

    Finds and returns RadioButtonGroup selected by the specified group name, throws TestFailedException if no element with the specified group name is found, or found any element with the specified group name but not a RadioButton

    groupName

    the group name with which to search

    driver

    the WebDriver with which to drive the browser

    returns

    the RadioButtonGroup selected by this query

    Definition Classes
    WebBrowser
  73. def reloadPage ()(implicit driver: WebDriver): Unit

    Reload the current page.

    Reload the current page.

    driver

    the WebDriver with which to drive the browser

    Definition Classes
    WebBrowser
  74. def setCaptureDir (targetDirPath: String): Unit

    Set capture directory.

    Set capture directory.

    targetDirPath

    the path of capture directory

    Definition Classes
    WebBrowser
  75. def setScriptTimeout (timeout: Span)(implicit driver: WebDriver): Unit

    Sets the amount of time to wait for an asynchronous script to finish execution before throwing an exception.

    Sets the amount of time to wait for an asynchronous script to finish execution before throwing an exception.

    timeout

    the amount of time to wait for an asynchronous script to finish execution before throwing exception

    Definition Classes
    WebBrowser
  76. def singleSel (queryString: String)(implicit driver: WebDriver): SingleSel

    Finds and returns the first SingleSel selected by the specified string ID or name, throws TestFailedException if element not found or the found element is not a SingleSel.

    Finds and returns the first SingleSel selected by the specified string ID or name, throws TestFailedException if element not found or the found element is not a SingleSel.

    queryString

    the string with which to search, first by ID then by name

    driver

    the WebDriver with which to drive the browser

    returns

    the SingleSel selected by this query

    Definition Classes
    WebBrowser
  77. def singleSel (query: Query)(implicit driver: WebDriver): SingleSel

    Finds and returns the first SingleSel selected by the specified Query, throws TestFailedException if element not found or the found element is not a SingleSel.

    Finds and returns the first SingleSel selected by the specified Query, throws TestFailedException if element not found or the found element is not a SingleSel.

    query

    the Query with which to search

    driver

    the WebDriver with which to drive the browser

    returns

    the SingleSel selected by this query

    Definition Classes
    WebBrowser
  78. def submit ()(implicit driver: WebDriver): Unit

    Submit the form where current active element belongs to, and throws TestFailedException if current active element is not in a form or underlying WebDriver encounters problem when submitting the form.

    Submit the form where current active element belongs to, and throws TestFailedException if current active element is not in a form or underlying WebDriver encounters problem when submitting the form. If this causes the current page to change, this call will block until the new page is loaded.

    driver

    the WebDriver with which to drive the browser

    Definition Classes
    WebBrowser
  79. object switch extends AnyRef

    This object is part of ScalaTest's Selenium DSL.

  80. def switchTo [T] (target: SwitchTarget[T])(implicit driver: WebDriver): T

    Switch to the specified SwitchTarget

    Switch to the specified SwitchTarget

    target

    the SwitchTarget to switch to

    driver

    the WebDriver with which to drive the browser

    returns

    instance of specified SwitchTarget's type parameter

    Definition Classes
    WebBrowser
  81. def synchronized [T0] (arg0: ⇒ T0): T0

    Attributes
    final
    Definition Classes
    AnyRef
  82. def tagName (tagName: String): TagNameQuery

    Returns a tag name query.

    Returns a tag name query.

    This method enables syntax such as the following:

    click on tagName("???")
             ^
    

    Definition Classes
    WebBrowser
  83. def textArea (queryString: String)(implicit driver: WebDriver): TextArea

    Finds and returns the first TextArea selected by the specified string ID or name, throws TestFailedException if element not found or the found element is not a TextArea.

    Finds and returns the first TextArea selected by the specified string ID or name, throws TestFailedException if element not found or the found element is not a TextArea.

    queryString

    the string with which to search, first by ID then by name

    driver

    the WebDriver with which to drive the browser

    returns

    the TextArea selected by this query

    Definition Classes
    WebBrowser
  84. def textArea (query: Query)(implicit driver: WebDriver): TextArea

    Finds and returns the first TextArea selected by the specified Query, throws TestFailedException if element not found or the found element is not a TextArea.

    Finds and returns the first TextArea selected by the specified Query, throws TestFailedException if element not found or the found element is not a TextArea.

    query

    the Query with which to search

    driver

    the WebDriver with which to drive the browser

    returns

    the TextArea selected by this query

    Definition Classes
    WebBrowser
  85. def textField (queryString: String)(implicit driver: WebDriver): TextField

    Finds and returns the first TextField selected by the specified string ID or name, throws TestFailedException if element not found or the found element is not a TextField.

    Finds and returns the first TextField selected by the specified string ID or name, throws TestFailedException if element not found or the found element is not a TextField.

    queryString

    the string with which to search, first by ID then by name

    driver

    the WebDriver with which to drive the browser

    returns

    the TextField selected by this query

    Definition Classes
    WebBrowser
  86. def textField (query: Query)(implicit driver: WebDriver): TextField

    Finds and returns the first TextField selected by the specified Query, throws TestFailedException if element not found or the found element is not a TextField.

    Finds and returns the first TextField selected by the specified Query, throws TestFailedException if element not found or the found element is not a TextField.

    query

    the Query with which to search

    driver

    the WebDriver with which to drive the browser

    returns

    the TextField selected by this query

    Definition Classes
    WebBrowser
  87. def toString (): String

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

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

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

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()
  91. implicit val webDriver : ChromeDriver

    WebBrowser subtrait that defines an implicit WebDriver for Chrome (an org.openqa.selenium.chrome.ChromeDriver).

    WebBrowser subtrait that defines an implicit WebDriver for Chrome (an org.openqa.selenium.chrome.ChromeDriver).

    Attributes
    implicit
  92. def window (nameOrHandle: String): WindowTarget

    This class supports switching to a window by name or handle in ScalaTest's Selenium DSL.

    This class supports switching to a window by name or handle in ScalaTest's Selenium DSL. Please see the documentation for WebBrowser for an overview of the Selenium DSL.

    This class is enables the following syntax:

    switch to window(windowHandle)
              ^
    

    nameOrHandle

    name or window handle of the window to switch to

    returns

    a WindowTarget instance

    Definition Classes
    WebBrowser
  93. def windowHandle (implicit driver: WebDriver): String

    Get an opaque handle to current active window that uniquely identifies it within the implicit driver instance.

    Get an opaque handle to current active window that uniquely identifies it within the implicit driver instance.

    driver

    the WebDriver with which to drive the browser

    Definition Classes
    WebBrowser
  94. def windowHandles (implicit driver: WebDriver): Set[String]

    Get a set of window handles which can be used to iterate over all open windows

    Get a set of window handles which can be used to iterate over all open windows

    driver

    the WebDriver with which to drive the browser

    Definition Classes
    WebBrowser
  95. def withScreenshot (fun: ⇒ Unit)(implicit driver: WebDriver): Unit

    Execute the given function, if ModifiableMessage exception is thrown from the given function, a screenshot will be captured automatically into capture directory, which by default is system property's java.

    Execute the given function, if ModifiableMessage exception is thrown from the given function, a screenshot will be captured automatically into capture directory, which by default is system property's java.io.tmpdir. You can change capture directory by calling setCaptureDir

    fun

    function to execute

    Definition Classes
    WebBrowser
  96. def xpath (xpath: String): XPathQuery

    Returns an XPath query.

    Returns an XPath query.

    This method enables syntax such as the following:

    click on xpath("???")
             ^
    

    Definition Classes
    WebBrowser
  97. def title (implicit driver: WebDriver): String

    Definition Classes
    WebBrowser
    Annotations
    @deprecated
    Deprecated

    The title method will be removed in the next 2.0 milestone release. Please use pageTitle instead.

  98. def wait [T] (timeout: Span, interval: Span = Span(500L, Milliseconds))(f: ⇒ T)(implicit driver: WebDriver): T

    Definition Classes
    WebBrowser
    Annotations
    @deprecated
    Deprecated

    The wait method will be removed in the next 2.0 milestone release. Please use eventually instead.

Inherited from ScreenshotCapturer

Inherited from WebBrowser

Inherited from AnyRef

Inherited from Any