setTimeout
command.regex:PATTERN
- Match using regular expression.regexi:PATTERN
- Match using case-insensitive regular expression.exact:STRING
- Match the string verbatim.glob:PATTERN
- Match using case-insensitive glob pattern. ?
will match any single character except new line (\n). *
will match any sequence (0 or more) of characters except new line. Empty PATTERN will match only other empty strings.PATTERN
- Same as glob matching.id=ID
- Locates element by its ID attribute.css=CSS_SELECTOR
- Locates element using a CSS selector.link=TEXT
- Locates link element whose visible text matches the given string.link-contains=TEXT
- Locates link element whose visible text contains the given string.name=NAME
- Locates element by its NAME attribute.tag=NAME
- Locates element by its tag name./XPATH
- Locates element using an XPath 1.0 expression.(XPATH)[]
- Locates element using an XPath 1.0 expression.alertDismiss
.alertAccept
.pattern
String
timeout
Number
optional
Timeout in milliseconds. Default is 60 seconds.locator
String
|Element
timeout
Number
optional
Timeout in milliseconds. Default is 60 seconds.locator
String
|Element
pattern
String
timeout
Number
optional
Timeout in milliseconds. Default is 60 seconds.waitForVisible
Boolean
optional
Wait for visible.locator
String
|Element
pattern
String
timeout
Number
optional
Timeout in milliseconds. Default is 60 seconds.waitForVisible
Boolean
optional
Wait for visible.locator
String
|Element
pattern
String
timeout
Number
optional
Timeout in milliseconds. Default is 60 seconds.text
String
|Element
timeout
Number
optional
Timeout in milliseconds. Default is 60 seconds.text
String
timeout
Number
optional
Timeout in milliseconds. Default is 60 seconds.pattern
String
timeout
Number
optional
Timeout in milliseconds. Default is 60 seconds.locator
String
|Element
pattern
String
timeout
Number
optional
Timeout in milliseconds. Default is 60 seconds.locator
String
|Element
timeout
Number
optional
Timeout in milliseconds. Default is 60 seconds.locator
String
|Element
timeout
Number
optional
Timeout in milliseconds. Default is 60 seconds.locator
String
|Element
clickParent
Boolean
optional
If true, then parent of the element is clicked.names
String
|Array.<String>
optional
Cookie name or a list of cookie names to delete.label=STRING
Matches option based on the visible text.
- value=STRING
Matches option based on its value.
- index=STRING
Matches option based on its index. The index is 0-based.selectLocator
String
optionLocator
String
timeout
Number
optional
Timeout in milliseconds. Default is 60 seconds.status
String
optional
Test status, either passed
or failed
.locator
String
|Element
timeout
Number
optional
Timeout in milliseconds. Default is 60 seconds.srcElement
String
dstElement
String
duration
Number
optional
How long the drag should take place.timeout
Number
optional
Timeout in milliseconds. Default is 60 seconds.null
is returned.script
String
|Function
arg
...Object
optional
Optional arguments to be passed to the JavaScript function.Object
- The return value.locator
String
|Element
input type=file
element.filepath
String
timeout
Number
optional
Timeout in milliseconds. Default is 60 seconds.locator
String
parent
Element
optional
Optional parent element for relative search.timeout
Number
optional
Timeout in milliseconds. Default is 60 seconds.Element
- A Element object.locator
String
parent
Element
optional
Optional parent element for relative search.timeout
Number
optional
Timeout in milliseconds. Default is 60 seconds.Array.<Element>
- Collection of Element objects.String
- The alert's text.locator
String
|Element
attribute
String
timeout
Number
optional
Timeout in milliseconds. Default is 60 seconds.String
- The attribute's value or null if no such attribute.Array.<Object>
- An array of browser console logs.Object
- Current capabilities object.names
String
String
- The attribute's value.locator
String
|Element
propertyName
String
timeout
Number
optional
Timeout in milliseconds. Default is 60 seconds.String
- CSS property value or null if no such property.Object
- WDIO driver.locator
String
|Element
Number
- Element count or 0 if no elements were found.locator
String
|Element
includeElementTag
Boolean
timeout
Number
optional
Timeout in milliseconds. Default is 60 seconds.String
- Source code of the element.String
- The page source.locator
String
|Element
timeout
Number
optional
Timeout in milliseconds. Default is 60 seconds.String
- The element's text.String
- The page title.String
- The page URL.locator
String
|Element
timeout
Number
optional
Timeout in milliseconds. Default is 60 seconds.String
- The value.Array.<String>
- Array of all available window handles.Object
- Size object. Example: { height: 1056, width: 1936, x: -8, y: -8 }text/xml
page.String
- The XML page source.caps
String
optional
Desired capabilities. If not specified capabilities will be taken from suite definition.seleniumUrl
String
optional
Remote server URL (default: http://localhost:4444/wd/hub).Boolean
- True if alert is present, false otherwise.locator
String
|Element
timeout
Number
optional
Timeout in milliseconds. Default is 60 seconds.Boolean
- true if element is checked. false otherwise.locator
String
|Element
timeout
Number
optional
Timeout in milliseconds to wait for element to appear. Default is 60 seconds.Boolean
- True if element was found. False otherwise.option
or input
element of type checkbox or radio is currently selected or not.locator
String
|Element
timeout
Number
optional
Timeout in milliseconds. Default is 60 seconds.Boolean
- true if element is selected. false otherwise.locator
String
|Element
timeout
Number
optional
Timeout in milliseconds to wait for element to appear. Default is 60 seconds.Boolean
- True if element was found and it was visible. False otherwise.web.type
command for file input fields which tend to be hidden.
Specifically makeVisible
will apply following styles to the specified element and all theparent elements:locator
String
|Element
newWindow
command waits for the page to load before proceeding.url
String
open
command waits for the page to load before proceeding.url
String
ms
Number