| Namespace | http://www.mulesoft.org/schema/mule/selenium |
|---|---|
| Schema Location | http://www.mulesoft.org/schema/mule/selenium/1.0/mule-selenium.xsd |
| Version | 1.0 |
| Minimum Mule Version | 3.2 |
Selenium WebDriver is a tool for automating testing web applications, and in particular to verify that they work as
expected. It aims to provide a friendly API that's easy to explore and understand, which will help make your tests
easier to read and maintain.
| Configuration | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Configure an instance of this module
| |||||||||||
| Message Processors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
If the element at the payload is a text entry element, this will clear the value.
| |||||||||||
Click the element at the payload.
| |||||||||||
Find the first
WebElement using the given method. | |||||||||||
Find all elements within the current page using the given mechanism.
| |||||||||||
Load a new web page in the current browser window.
| |||||||||||
Get the value of a the given attribute of the element.
| |||||||||||
Get a string representing the current URL that the browser is looking at.
| |||||||||||
Get the visible (i.e.
| |||||||||||
The title of the current page.
| |||||||||||
Is the element currently enabled or not? This will generally return true for everything but
disabled input elements.
| |||||||||||
Determine whether or not this element is selected or not.
| |||||||||||
Use this method to simulate typing into an element, which may set its value.
| |||||||||||
If the element at the payload is a form, or an element within a form, then this will be submitted to
the remote server.
| |||||||||||
Wait until the condition is successful
| |||||||||||
To use the this module within a flow the namespace to the module must be included. The resulting flow will look similar to the following:
<mule xmlns="http://www.mulesoft.org/schema/mule/core"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:selenium="http://www.mulesoft.org/schema/mule/selenium"
xsi:schemaLocation="
http://www.mulesoft.org/schema/mule/core
http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/selenium
http://www.mulesoft.org/schema/mule/selenium/1.0/mule-selenium.xsd">
<!-- here goes your flows and configuration elements -->
</mule>
This module is configured using the config element. This element must be placed outside of your flows and at the root of your Mule application. You can create as many configurations as you deem necesary as long as each carries its own name.
Each message processor, message source or transformer carries a config-ref attribute that allows the invoker to specify which configuration to use.
| Attributes | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Type | Name | Default Value | Description | Optional. Give a name to this configuration so it can be later referenced. | |||||||
| HTMLUNIT | Optional. Web driver to use | ||||||||||
If the element at the payload is a text entry element, this will clear the value. Has no effect on other elements. Text entry elements are INPUT and TEXTAREA elements.
INCLUDE_ERROR
| Optional. Specify which configuration to use. | ||
| Element located at the payload of the message
|
||
| 1 | Optional. Specify how many times this operation can be retried automatically |
Click the element at the payload. If this causes a new page to load, this method will block until the page has loaded. At this point, you should discard all references to this element and any further operations performed on this element will have undefined behaviour unless you know that the element and the page will still be present. If click() causes a new page to be loaded via an event or is done by sending a native event (which is a common case on Firefox, IE on Windows) then the method will *not* wait for it to be loaded and the caller should verify that a new page has been loaded.
If this element is not clickable, then this operation is a no-op since it's pretty common for someone to accidentally miss the target when clicking in Real LifeINCLUDE_ERROR
| Optional. Specify which configuration to use. | ||
| Element located at the payload of the message
|
||
| 1 | Optional. Specify how many times this operation can be retried automatically |
Find the first
WebElement using the given method.
This method is affected by the 'implicit wait' times in force at the time of execution.
The findElement(..) invocation will return a matching row, or try again repeatedly until
the configured timeout is reached.
INCLUDE_ERROR
| Optional. Specify which configuration to use. | ||
| Optional. The value of the "id" attribute to search for |
||
| Optional. The exact text to match against |
||
| Optional. The text to match against |
||
| Optional. The value of the "name" attribute to search for |
||
| Optional. The element's tagName |
||
| Optional. The xpath to use |
||
| Optional. The value of the "class" attribute to search for * @return The first matching element on the current page |
||
| 1 | Optional. Specify how many times this operation can be retried automatically |
| NoSuchElementException | If no matching elements are found
|
|---|
Find all elements within the current page using the given mechanism. This method is affected by the 'implicit wait' times in force at the time of execution. When implicitly waiting, this method will return as soon as there are more than 0 items in the found collection, or will return an empty list if the timeout is reached.
Only one of the attributes can be used at any given time.INCLUDE_ERROR
| Optional. Specify which configuration to use. | ||
| Optional. The value of the "id" attribute to search for |
||
| Optional. The exact text to match against |
||
| Optional. The text to match against |
||
| Optional. The value of the "name" attribute to search for |
||
| Optional. The element's tagName |
||
| Optional. The xpath to use |
||
| Optional. The value of the "class" attribute to search for |
||
| 1 | Optional. Specify how many times this operation can be retried automatically |
Load a new web page in the current browser window. This is done using an HTTP GET operation,
and the method will block until the load is complete. This will follow redirects issued either
by the server or as a meta-redirect from within the returned HTML. Should a meta-redirect
"rest" for any duration of time, it is best to wait until this timeout is over, since should
the underlying page change whilst your test is executing the results of future calls against
this interface will be against the freshly loaded page. Synonym for
to(String).
INCLUDE_ERROR
| Optional. Specify which configuration to use. | ||
| The URL to load. It is best to use a fully qualified URL
|
||
| 1 | Optional. Specify how many times this operation can be retried automatically |
Get the value of a the given attribute of the element. Will return the current value, even if this has been modified after the page has been loaded. More exactly, this method will return the value of the given attribute, unless that attribute is not present, in which case the value of the property with the same name is returned. If neither value is set, null is returned. The "style" attribute is converted as best can be to a text representation with a trailing semi-colon. The following are deemed to be "boolean" attributes, and will return either "true" or "false":
async, autofocus, autoplay, checked, compact, complete, controls, declare, defaultchecked, defaultselected, defer, disabled, draggable, ended, formnovalidate, hidden, indeterminate, iscontenteditable, ismap, itemscope, loop, multiple, muted, nohref, noresize, noshade, novalidate, nowrap, open, paused, pubdate, readonly, required, reversed, scoped, seamless, seeking, selected, spellcheck, truespeed, willvalidate Finally, the following commonly mis-capitalized attribute/property names are evaluated as expected:INCLUDE_ERROR
| Optional. Specify which configuration to use. | ||
| Element located at the payload of the message |
||
| The name of the attribute. |
||
| 1 | Optional. Specify how many times this operation can be retried automatically |
Get a string representing the current URL that the browser is looking at.
INCLUDE_ERROR
| Optional. Specify which configuration to use. | ||
| 1 | Optional. Specify how many times this operation can be retried automatically |
Get the visible (i.e. not hidden by CSS) innerText of this element, including sub-elements, without any leading or trailing whitespace.
INCLUDE_ERROR
| Optional. Specify which configuration to use. | ||
| Element located at the payload of the message |
||
| 1 | Optional. Specify how many times this operation can be retried automatically |
The title of the current page.
INCLUDE_ERROR
| Optional. Specify which configuration to use. | ||
| 1 | Optional. Specify how many times this operation can be retried automatically |
Is the element currently enabled or not? This will generally return true for everything but disabled input elements.
INCLUDE_ERROR
| Optional. Specify which configuration to use. | ||
| Element located at the payload of the message |
||
| 1 | Optional. Specify how many times this operation can be retried automatically |
Determine whether or not this element is selected or not. This operation only applies to input elements such as checkboxes, options in a select and radio buttons.
INCLUDE_ERROR
| Optional. Specify which configuration to use. | ||
| Element located at the payload of the message |
||
| 1 | Optional. Specify how many times this operation can be retried automatically |
Use this method to simulate typing into an element, which may set its value. The payload
must be of type
WebElement
INCLUDE_ERROR
| Optional. Specify which configuration to use. | ||
| Element located at the payload of the message |
||
| Keys to send
|
||
| 1 | Optional. Specify how many times this operation can be retried automatically |
If the element at the payload is a form, or an element within a form, then this will be submitted to the remote server. If this causes the current page to change, then this method will block until the new page is loaded.
INCLUDE_ERROR
| Optional. Specify which configuration to use. | ||
| Element located at the payload of the message |
||
| 1 | Optional. Specify how many times this operation can be retried automatically |
| java.util.NoSuchElementException} If the given element is not within a form
|
Wait until the condition is successful
INCLUDE_ERROR
| Optional. Specify which configuration to use. | ||
| Optional. The timeout in seconds when an expectation is called |
||
| 1 | Optional. Specify how many times this operation can be retried automatically |
| Nested processor to be executed for evaluating conditions
|