This class supports switching to the currently active element in ScalaTest's Selenium DSL.
This class 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 ^
This class supports switching to the alert box in ScalaTest's Selenium DSL.
This class 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 alertBox ^
This class is part of ScalaTest's Selenium DSL.
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:
checkbox("cbx1").select()
TestFailedExeption
if the passed WebElement
does not represent a checkbox
A class name query.
A class name query.
This class enables syntax such as the following:
click on className("???")
^
the query string for this query.
This class is part of ScalaTest's Selenium DSL.
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:
colorField("q").value should be ("Cheese!")
TestFailedExeption
if the passed WebElement
does not represent a color field
This class is part of the ScalaTest's Selenium DSL.
This class is part of the ScalaTest's Selenium DSL. Please see the documentation for WebBrowser
for an overview of the Selenium DSL.
A CSS selector query.
A CSS selector query.
This class enables syntax such as the following:
click on cssSelector("???")
^
the query string for this query.
This class is part of ScalaTest's Selenium DSL.
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:
dateField("q").value should be ("2003-03-01")
TestFailedExeption
if the passed WebElement
does not represent a date field
This class is part of ScalaTest's Selenium DSL.
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:
dateTimeField("q").value should be ("2003-03-01T12:13:14")
TestFailedExeption
if the passed WebElement
does not represent a datetime field
This class is part of ScalaTest's Selenium DSL.
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:
dateTimeLocalField("q").value should be ("2003-03-01T12:13:14")
TestFailedExeption
if the passed WebElement
does not represent a datetime-local field
This class supports switching to the default content in ScalaTest's Selenium DSL.
This class 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 ^
A dimension containing the width and height of a screen element.
A dimension containing the width and height of a screen element.
Wrapper class for a Selenium WebElement
.
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.
This class is part of ScalaTest's Selenium DSL.
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:
emailField("q").value should be ("foo@bar.com")
TestFailedExeption
if the passed WebElement
does not represent a email field
This class supports switching to a frame by element in ScalaTest's Selenium DSL.
This class 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.
This class supports switching to a frame by index in ScalaTest's Selenium DSL.
This class 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) ^
This class supports switching to a frame by name or ID in ScalaTest's Selenium DSL.
This class 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") ^
This class supports switching to a frame by web element in ScalaTest's Selenium DSL.
This class 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.
An ID query.
An ID query.
This class enables syntax such as the following:
click on id("q")
^
the query string for this query.
A link text query.
A link text query.
This class enables syntax such as the following:
click on linkText("???")
^
the query string for this query.
This class is part of ScalaTest's Selenium DSL.
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:
monthField("q").value should be ("2003-04")
TestFailedExeption
if the passed WebElement
does not represent a month field
This class is part of ScalaTest's Selenium DSL.
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:
multiSel("select2").clear("option5")
TestFailedExeption
if the passed WebElement
does not represent a multiple selection list
This class is part of ScalaTest's Selenium DSL.
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:
multiSel("select2").values += "option5" ^
Instances of this class are returned from the values
method of MultiSel
.
MultiSelOptionSeq
is an immutable IndexedSeq[String]
that wraps an underlying immutable IndexedSeq[String]
and adds two
methods, +
and -
, to facilitate the +=
syntax for setting additional options
of the MultiSel
. The Scala compiler will rewrite:
multiSel("select2").values += "option5"
To:
multiSel("select2").values = multiSel("select2").values + "option5"
Thus, first a new MultiSelOptionSeq
is created by invoking the +
method on the MultiSelOptionSeq
returned by values
, and that result is passed to the values_=
method.
For symmetry, this class also offers a -
method, which can be used to deselect an option, like this:
multiSel("select2").values -= "option5" ^
A name query.
A name query.
This class enables syntax such as the following:
click on name("q")
^
the query string for this query.
This class is part of ScalaTest's Selenium DSL.
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:
numberField("q").value should be ("1.3")
TestFailedExeption
if the passed WebElement
does not represent a number field
A partial link text query.
A partial link text query.
This class enables syntax such as the following:
click on partialLinkText("???")
^
the query string for this query.
This class is part of ScalaTest's Selenium DSL.
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:
pwdField("q").value should be ("Cheese!")
TestFailedExeption
if the passed WebElement
does not represent a password field
A point containing an XY screen location.
A point containing an XY screen location.
This trait is part of ScalaTest's Selenium DSL.
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")
^
This class is part of ScalaTest's Selenium DSL.
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:
radioButton(id("opt1")).value should be ("Option 1!")
TestFailedExeption
if the passed WebElement
does not represent a text area
This class is part of ScalaTest's Selenium DSL.
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:
radioButtonGroup("group1").value should be ("Option 2")
TestFailedExeption
if no radio button with the passed groupName
are found
This class is part of ScalaTest's Selenium DSL.
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:
rangeField("q").value should be ("1.3")
TestFailedExeption
if the passed WebElement
does not represent a range field
This class is part of ScalaTest's Selenium DSL.
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:
searchField("q").value should be ("google")
TestFailedExeption
if the passed WebElement
does not represent a search field
This class is part of ScalaTest's Selenium DSL.
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:
singleSel.clear()
TestFailedExeption
if the passed WebElement
does not represent a single selection list
This sealed abstract class supports switching in ScalaTest's Selenium DSL.
This sealed abstract class supports switching in ScalaTest's Selenium DSL.
Please see the documentation for WebBrowser
for an overview of the Selenium DSL.
One subclass of SwitchTarget
exists for each kind of target that
can be switched to: active element, alert box, default content, frame (indentified by index,
name or id, or enclosed element), and window.
A tag name query.
A tag name query.
This class enables syntax such as the following:
click on tagName("???")
^
the query string for this query.
This class is part of ScalaTest's Selenium DSL.
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:
telField("q").value should be ("911-911-9191")
TestFailedExeption
if the passed WebElement
does not represent a tel field
This class is part of ScalaTest's Selenium DSL.
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:
textArea("q").value should be ("Cheese!")
TestFailedExeption
if the passed WebElement
does not represent a text area
This class is part of ScalaTest's Selenium DSL.
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:
textField("q").value should be ("Cheese!")
TestFailedExeption
if the passed WebElement
does not represent a text field
This class is part of ScalaTest's Selenium DSL.
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:
timeField("q").value should be ("12:13:14")
TestFailedExeption
if the passed WebElement
does not represent a time field
This class is part of ScalaTest's Selenium DSL.
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:
urlField("q").value should be ("http://google.com")
TestFailedExeption
if the passed WebElement
does not represent a url field
This class is part of ScalaTest's Selenium DSL.
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:
weekField("q").value should be ("1996-W16")
TestFailedExeption
if the passed WebElement
does not represent a week field
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) ^
Wrapper class for a Selenium Cookie
.
Wrapper class for a Selenium Cookie
.
This class provides idiomatic Scala access to the services of an underlying Cookie
.
You can access the wrapped Cookie
via the underlying
method.
An XPath query.
An XPath query.
This class enables syntax such as the following:
click on xpath("???")
^
the query string for this query.
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 ^
This object is part of ScalaTest's Selenium DSL.
This object is part of ScalaTest's Selenium DSL. Please see the documentation for
WebBrowser
for an overview of the Selenium DSL.
This object enables syntax such as the following:
add cookie("aName", "aValue") ^
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.
cookie's name
cookie's value
cookie's path
cookie's expiry data
cookie's domain name
whether this cookie is secured.
the WebDriver
with which to drive the browser
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 alertBox ^
This object is part of ScalaTest's Selenium DSL.
This object is part of ScalaTest's Selenium DSL. Please see the documentation for
WebBrowser
for an overview of the Selenium DSL.
This object enables syntax such as the following:
capture
^
capture to "MyScreenshot.png"
^
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.
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.
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
screenshot file name, if does not end with .png, it will be extended automatically
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
.
the string with which to search, first by ID then by name
the WebDriver
with which to drive the browser
the Checkbox
selected by this query
TestFailedException
if element not found or 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
.
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
.
the Query
with which to search
the WebDriver
with which to drive the browser
the Checkbox
selected by this query
TestFailedException
if element not found or found element is not a Checkbox
Returns a class name query.
Returns a class name query.
This method enables syntax such as the following:
click on className("???")
^
This object is part of ScalaTest's Selenium DSL.
This object is part of ScalaTest's Selenium DSL. Please see the documentation for
WebBrowser
for an overview of the Selenium DSL.
This object enables syntax such as the following:
click on "aButton"
^
Click on the specified Element
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
the string with which to search, first by ID then by name
the WebDriver
with which to drive the browser
Click on the first Element
selected by the specified Query
Click on the first Element
selected by the specified Query
the Query
with which to search
the WebDriver
with which to drive the browser
Click on the specified WebElement
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.
the WebDriver
with which to drive the browser
Finds and returns the first ColorField
selected by the specified string ID or name, throws TestFailedException
if element not found or the found element is not a ColorField
.
Finds and returns the first ColorField
selected by the specified string ID or name, throws TestFailedException
if element not found or the found element is not a ColorField
.
the string with which to search, first by ID then by name
the WebDriver
with which to drive the browser
the ColorField
selected by this query
TestFailedException
if element not found or found element is not a ColorField
Finds and returns the first ColorField
selected by the specified Query
, throws TestFailedException
if element not found or the found element is not a ColorField
.
Finds and returns the first ColorField
selected by the specified Query
, throws TestFailedException
if element not found or the found element is not a ColorField
.
the Query
with which to search
the WebDriver
with which to drive the browser
the ColorField
selected by this query
TestFailedException
if element not found or found element is not a ColorField
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.
cookie's name
a WrappedCookie instance
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 ^
Returns a CSS selector query.
Returns a CSS selector query.
This method enables syntax such as the following:
click on cssSelector("???")
^
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.
the WebDriver
with which to drive the browser
the URL of the current page
Finds and returns the first DateField
selected by the specified string ID or name, throws TestFailedException
if element not found or the found element is not a DateField
.
Finds and returns the first DateField
selected by the specified string ID or name, throws TestFailedException
if element not found or the found element is not a DateField
.
the string with which to search, first by ID then by name
the WebDriver
with which to drive the browser
the DateField
selected by this query
TestFailedException
if element not found or found element is not a DateField
Finds and returns the first DateField
selected by the specified Query
, throws TestFailedException
if element not found or the found element is not a DateField
.
Finds and returns the first DateField
selected by the specified Query
, throws TestFailedException
if element not found or the found element is not a DateField
.
the Query
with which to search
the WebDriver
with which to drive the browser
the DateField
selected by this query
TestFailedException
if element not found or found element is not a DateField
Finds and returns the first DateTimeField
selected by the specified string ID or name, throws TestFailedException
if element not found or the found element is not a DateTimeField
.
Finds and returns the first DateTimeField
selected by the specified string ID or name, throws TestFailedException
if element not found or the found element is not a DateTimeField
.
the string with which to search, first by ID then by name
the WebDriver
with which to drive the browser
the DateTimeField
selected by this query
TestFailedException
if element not found or found element is not a DateTimeField
Finds and returns the first DateTimeField
selected by the specified Query
, throws TestFailedException
if element not found or the found element is not a DateTimeField
.
Finds and returns the first DateTimeField
selected by the specified Query
, throws TestFailedException
if element not found or the found element is not a DateTimeField
.
the Query
with which to search
the WebDriver
with which to drive the browser
the DateTimeField
selected by this query
TestFailedException
if element not found or found element is not a DateTimeField
Finds and returns the first DateTimeLocalField
selected by the specified string ID or name, throws TestFailedException
if element not found or the found element is not a DateTimeLocalField
.
Finds and returns the first DateTimeLocalField
selected by the specified string ID or name, throws TestFailedException
if element not found or the found element is not a DateTimeLocalField
.
the string with which to search, first by ID then by name
the WebDriver
with which to drive the browser
the DateTimeLocalField
selected by this query
TestFailedException
if element not found or found element is not a DateTimeLocalField
Finds and returns the first DateTimeLocalField
selected by the specified Query
, throws TestFailedException
if element not found or the found element is not a DateTimeLocalField
.
Finds and returns the first DateTimeLocalField
selected by the specified Query
, throws TestFailedException
if element not found or the found element is not a DateTimeLocalField
.
the Query
with which to search
the WebDriver
with which to drive the browser
the DateTimeLocalField
selected by this query
TestFailedException
if element not found or found element is not a DateTimeLocalField
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 ^
This object is part of ScalaTest's Selenium DSL.
This object is part of ScalaTest's Selenium DSL. Please see the documentation for
WebBrowser
for an overview of the Selenium DSL.
This object enables syntax such as the following:
delete cookie "aName"
^
delete all cookies
^
Delete all cookies in the current domain from web browser.
Delete all cookies in the current domain from web browser.
the WebDriver
with which to drive the browser
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.
cookie's name
the WebDriver
with which to drive the browser
Finds and returns the first EmailField
selected by the specified string ID or name, throws TestFailedException
if element not found or the found element is not a EmailField
.
Finds and returns the first EmailField
selected by the specified string ID or name, throws TestFailedException
if element not found or the found element is not a EmailField
.
the string with which to search, first by ID then by name
the WebDriver
with which to drive the browser
the EmailField
selected by this query
TestFailedException
if element not found or found element is not a EmailField
Finds and returns the first EmailField
selected by the specified Query
, throws TestFailedException
if element not found or the found element is not a EmailField
.
Finds and returns the first EmailField
selected by the specified Query
, throws TestFailedException
if element not found or the found element is not a EmailField
.
the Query
with which to search
the WebDriver
with which to drive the browser
the EmailField
selected by this query
TestFailedException
if element not found or found element is not a EmailField
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
.
keys to press in current active TextField
or TextArea
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:
Script arguments must be a number, boolean, String, WebElement, or a List of any combination of these. 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.
(Note that although this behavior is specified by Selenium's JavascriptExecutor Javadoc,
it may still be possible for the underlying JavascriptExecutor
implementation to return an objects of other types.
For example, HtmlUnit
has been observed to return a java.util.Map
for a Javascript object.)
the JavaScript to execute
the arguments to the script, may be empty
One of Boolean, Long, String, List, WebElement, or null (following Selenium's JavascriptExecutor Javadoc)
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:
Script arguments must be a number, boolean, String, WebElement, or a List of any combination of these. 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.
(Note that although this behavior is specified by Selenium's JavascriptExecutor Javadoc,
it may still be possible for the underlying JavascriptExecutor
implementation to return an objects of other types.
For example, HtmlUnit
has been observed to return a java.util.Map
for a Javascript object.)
the JavaScript to execute
the arguments to the script, may be empty
One of Boolean, Long, String, List or WebElement. Or null (following Selenium's JavascriptExecutor Javadoc)
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
.
the string with which to search, first by ID then by name
the WebDriver
with which to drive the browser
the Element
selected by this 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.
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
.
the Query
with which to search
the WebDriver
with which to drive the browser
the Element
selected by this query, wrapped in a Some
, or None
if
no Element
is selected
Returns an Iterator
over all Element
s selected by the specified string ID or name
Returns an Iterator
over all Element
s 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
.
the string with which to search, first by ID then by name
the WebDriver
with which to drive the browser
the Iterator
over all Element
s selected by this query
Returns an Iterator
over all Element
s selected by this query.
Returns an Iterator
over all Element
s selected by this 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 this query, this method will return an empty Iterator
will be returned.
the Query
with which to search
the WebDriver
with which to drive the browser
the Iterator
over all Element
s selected by this query
The FirefoxProfile
passed to the constructor of the FirefoxDriver
returned by webDriver
.
The FirefoxProfile
passed to the constructor of the FirefoxDriver
returned by webDriver
.
The FirefoxDriver
uses the FirefoxProfile
defined as firefoxProfile
. By default this is just a new FirefoxProfile
.
You can mutate this object to modify the profile, or override firefoxProfile
.
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
used to select WebElement
which is contained in the frame to switch to
a FrameWebElementTarget instance
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
which is contained in the frame to switch to
a FrameElementTarget instance
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.
WebElement
which is contained in the frame to switch to
a FrameWebElementTarget instance
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") ^
name or ID of the frame to switch to
a FrameNameOrIdTarget instance
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) ^
the index of frame to switch to
a FrameIndexTarget instance
This object is part of ScalaTest's Selenium DSL.
This object is part of ScalaTest's Selenium DSL. Please see the documentation for
WebBrowser
for an overview of the Selenium DSL.
This object enables syntax such as the following:
go to "http://www.artima.com"
^
Go back to previous page.
Go back to previous page.
the WebDriver
with which to drive the browser
Go forward to next page.
Go forward to next page.
the WebDriver
with which to drive the browser
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)
the Page
object containing the URL to which to send the browser
the WebDriver
with which to drive the browser
Sends the browser to the passed URL.
Sends the browser to the passed URL.
Here's an example:
goTo("http://www.artima.com")
the URL to which to send the browser
the WebDriver
with which to drive the browser
Returns an ID query.
Returns an ID query.
This method enables syntax such as the following:
click on id("q")
^
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.
the time span to implicitly wait
the WebDriver
on which to set the implicit wait
Check if screenshot is supported
Check if screenshot is supported
the WebDriver
with which to drive the browser
true if screenshot is supported, false otherwise
Returns a link text query.
Returns a link text query.
This method enables syntax such as the following:
click on linkText("???")
^
Finds and returns the first MonthField
selected by the specified string ID or name, throws TestFailedException
if element not found or the found element is not a MonthField
.
Finds and returns the first MonthField
selected by the specified string ID or name, throws TestFailedException
if element not found or the found element is not a MonthField
.
the string with which to search, first by ID then by name
the WebDriver
with which to drive the browser
the MonthField
selected by this query
TestFailedException
if element not found or found element is not a MonthField
Finds and returns the first MonthField
selected by the specified Query
, throws TestFailedException
if element not found or the found element is not a MonthField
.
Finds and returns the first MonthField
selected by the specified Query
, throws TestFailedException
if element not found or the found element is not a MonthField
.
the Query
with which to search
the WebDriver
with which to drive the browser
the MonthField
selected by this query
TestFailedException
if element not found or found element is not a MonthField
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
.
the string with which to search, first by ID then by name
the WebDriver
with which to drive the browser
the MultiSel
selected by this query
TestFailedException
if element not found or 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
.
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
.
the Query
with which to search
the WebDriver
with which to drive the browser
the MultiSel
selected by this query
TestFailedException
if element not found or found element is not a MultiSel
Returns a name query.
Returns a name query.
This method enables syntax such as the following:
click on name("q")
^
Finds and returns the first NumberField
selected by the specified string ID or name, throws TestFailedException
if element not found or the found element is not a NumberField
.
Finds and returns the first NumberField
selected by the specified string ID or name, throws TestFailedException
if element not found or the found element is not a NumberField
.
the string with which to search, first by ID then by name
the WebDriver
with which to drive the browser
the NumberField
selected by this query
TestFailedException
if element not found or found element is not a NumberField
Finds and returns the first NumberField
selected by the specified Query
, throws TestFailedException
if element not found or the found element is not a NumberField
.
Finds and returns the first NumberField
selected by the specified Query
, throws TestFailedException
if element not found or the found element is not a NumberField
.
the Query
with which to search
the WebDriver
with which to drive the browser
the NumberField
selected by this query
TestFailedException
if element not found or found element is not a NumberField
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.
the WebDriver
with which to drive the browser
the source of the current page
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.
the WebDriver
with which to drive the browser
the current page's title, or the empty string if the current page has no title
Returns a partial link text query.
Returns a partial link text query.
This method enables syntax such as the following:
click on partialLinkText("???")
^
Press the passed keys to current active element.
Press the passed keys to current active element.
keys to press in current active element
Finds and returns the first PasswordField
selected by the specified string ID or name, throws TestFailedException
if element not found or the found element is not a PasswordField
.
Finds and returns the first PasswordField
selected by the specified string ID or name, throws TestFailedException
if element not found or the found element is not a PasswordField
.
the string with which to search, first by ID then by name
the WebDriver
with which to drive the browser
the PasswordField
selected by this query
TestFailedException
if element not found or found element is not a PasswordField
Finds and returns the first PasswordField
selected by the specified Query
, throws TestFailedException
if element not found or the found element is not a PasswordField
.
Finds and returns the first PasswordField
selected by the specified Query
, throws TestFailedException
if element not found or the found element is not a PasswordField
.
the Query
with which to search
the WebDriver
with which to drive the browser
the PasswordField
selected by this query
TestFailedException
if element not found or found element is not a PasswordField
Close all windows, and exit the driver.
Close all windows, and exit the driver.
the WebDriver
on which to quit.
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
.
the string with which to search, first by ID then by name
the WebDriver
with which to drive the browser
the RadioButton
selected by this query
TestFailedException
if element not found or 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
.
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
.
the Query
with which to search
the WebDriver
with which to drive the browser
the RadioButton
selected by this query
TestFailedException
if element not found or found element is 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
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
the group name with which to search
the WebDriver
with which to drive the browser
the RadioButtonGroup
selected by this query
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 the first RangeField
selected by the specified string ID or name, throws TestFailedException
if element not found or the found element is not a RangeField
.
Finds and returns the first RangeField
selected by the specified string ID or name, throws TestFailedException
if element not found or the found element is not a RangeField
.
the string with which to search, first by ID then by name
the WebDriver
with which to drive the browser
the RangeField
selected by this query
TestFailedException
if element not found or found element is not a RangeField
Finds and returns the first RangeField
selected by the specified Query
, throws TestFailedException
if element not found or the found element is not a RangeField
.
Finds and returns the first RangeField
selected by the specified Query
, throws TestFailedException
if element not found or the found element is not a RangeField
.
the Query
with which to search
the WebDriver
with which to drive the browser
the RangeField
selected by this query
TestFailedException
if element not found or found element is not a RangeField
Reload the current page.
Reload the current page.
the WebDriver
with which to drive the browser
Finds and returns the first SearchField
selected by the specified string ID or name, throws TestFailedException
if element not found or the found element is not a SearchField
.
Finds and returns the first SearchField
selected by the specified string ID or name, throws TestFailedException
if element not found or the found element is not a SearchField
.
the string with which to search, first by ID then by name
the WebDriver
with which to drive the browser
the SearchField
selected by this query
TestFailedException
if element not found or found element is not a SearchField
Finds and returns the first SearchField
selected by the specified Query
, throws TestFailedException
if element not found or the found element is not a SearchField
.
Finds and returns the first SearchField
selected by the specified Query
, throws TestFailedException
if element not found or the found element is not a SearchField
.
the Query
with which to search
the WebDriver
with which to drive the browser
the SearchField
selected by this query
TestFailedException
if element not found or found element is not a SearchField
Set capture directory.
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.
the amount of time to wait for an asynchronous script to finish execution before throwing exception
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
.
the string with which to search, first by ID then by name
the WebDriver
with which to drive the browser
the SingleSel
selected by this query
TestFailedException
if element not found or 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
.
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
.
the Query
with which to search
the WebDriver
with which to drive the browser
the SingleSel
selected by this query
TestFailedException
if element not found or found element is not a SingleSel
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.
the WebDriver
with which to drive the browser
TestFailedException
if current active element is not in a form or underlying WebDriver encounters problem when submitting the form.
This object is part of ScalaTest's Selenium DSL.
This object is part of ScalaTest's Selenium DSL. Please see the documentation for
WebBrowser
for an overview of the Selenium DSL.
This object enables syntax such as the following:
switch to alertBox ^
Switch to the specified SwitchTarget
Switch to the specified SwitchTarget
the SwitchTarget
to switch to
the WebDriver
with which to drive the browser
instance of specified SwitchTarget
's type parameter
Returns a tag name query.
Returns a tag name query.
This method enables syntax such as the following:
click on tagName("???")
^
Finds and returns the first TelField
selected by the specified string ID or name, throws TestFailedException
if element not found or the found element is not a TelField
.
Finds and returns the first TelField
selected by the specified string ID or name, throws TestFailedException
if element not found or the found element is not a TelField
.
the string with which to search, first by ID then by name
the WebDriver
with which to drive the browser
the TelField
selected by this query
TestFailedException
if element not found or found element is not a TelField
Finds and returns the first TelField
selected by the specified Query
, throws TestFailedException
if element not found or the found element is not a TelField
.
Finds and returns the first TelField
selected by the specified Query
, throws TestFailedException
if element not found or the found element is not a TelField
.
the Query
with which to search
the WebDriver
with which to drive the browser
the TelField
selected by this query
TestFailedException
if element not found or found element is not a TelField
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
.
the string with which to search, first by ID then by name
the WebDriver
with which to drive the browser
the TextArea
selected by this query
TestFailedException
if element not found or 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
.
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
.
the Query
with which to search
the WebDriver
with which to drive the browser
the TextArea
selected by this query
TestFailedException
if element not found or found element is not a TextArea
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
.
the string with which to search, first by ID then by name
the WebDriver
with which to drive the browser
the TextField
selected by this query
TestFailedException
if element not found or 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
.
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
.
the Query
with which to search
the WebDriver
with which to drive the browser
the TextField
selected by this query
TestFailedException
if element not found or found element is not a TextField
Finds and returns the first TimeField
selected by the specified string ID or name, throws TestFailedException
if element not found or the found element is not a TimeField
.
Finds and returns the first TimeField
selected by the specified string ID or name, throws TestFailedException
if element not found or the found element is not a TimeField
.
the string with which to search, first by ID then by name
the WebDriver
with which to drive the browser
the TimeField
selected by this query
TestFailedException
if element not found or found element is not a TimeField
Finds and returns the first TimeField
selected by the specified Query
, throws TestFailedException
if element not found or the found element is not a TimeField
.
Finds and returns the first TimeField
selected by the specified Query
, throws TestFailedException
if element not found or the found element is not a TimeField
.
the Query
with which to search
the WebDriver
with which to drive the browser
the TimeField
selected by this query
TestFailedException
if element not found or found element is not a TimeField
Finds and returns the first UrlField
selected by the specified string ID or name, throws TestFailedException
if element not found or the found element is not a UrlField
.
Finds and returns the first UrlField
selected by the specified string ID or name, throws TestFailedException
if element not found or the found element is not a UrlField
.
the string with which to search, first by ID then by name
the WebDriver
with which to drive the browser
the UrlField
selected by this query
TestFailedException
if element not found or found element is not a UrlField
Finds and returns the first UrlField
selected by the specified Query
, throws TestFailedException
if element not found or the found element is not a UrlField
.
Finds and returns the first UrlField
selected by the specified Query
, throws TestFailedException
if element not found or the found element is not a UrlField
.
the Query
with which to search
the WebDriver
with which to drive the browser
the UrlField
selected by this query
TestFailedException
if element not found or found element is not a UrlField
WebBrowser
subtrait that defines an implicit WebDriver
for Firefox (an org.openqa.selenium.firefox.FirefoxDriver
), with a default
Firefox profile.
WebBrowser
subtrait that defines an implicit WebDriver
for Firefox (an org.openqa.selenium.firefox.FirefoxDriver
), with a default
Firefox profile.
The FirefoxDriver
uses the FirefoxProfile
defined as firefoxProfile
. By default this is just a new FirefoxProfile
.
You can mutate this object to modify the profile, or override firefoxProfile
.
Finds and returns the first WeekField
selected by the specified string ID or name, throws TestFailedException
if element not found or the found element is not a WeekField
.
Finds and returns the first WeekField
selected by the specified string ID or name, throws TestFailedException
if element not found or the found element is not a WeekField
.
the string with which to search, first by ID then by name
the WebDriver
with which to drive the browser
the WeekField
selected by this query
TestFailedException
if element not found or found element is not a WeekField
Finds and returns the first WeekField
selected by the specified Query
, throws TestFailedException
if element not found or the found element is not a WeekField
.
Finds and returns the first WeekField
selected by the specified Query
, throws TestFailedException
if element not found or the found element is not a WeekField
.
the Query
with which to search
the WebDriver
with which to drive the browser
the WeekField
selected by this query
TestFailedException
if element not found or found element is not a WeekField
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) ^
name or window handle of the window to switch to
a WindowTarget instance
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.
the WebDriver
with which to drive the browser
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
the WebDriver
with which to drive the browser
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.
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
function to execute
the value returned by fun
Returns an XPath query.
Returns an XPath query.
This method enables syntax such as the following:
click on xpath("???")
^
Companion object that facilitates the importing of
Firefox
members as an alternative to mixing it in. One use case is to importFirefox
members so you can use them in the Scala interpreter.