Driver: @appium/base-driver
Commands
POST
/session
Historically the first two arguments were reserved for JSONWP capabilities. Appium 2 has dropped the support of these, so now we only accept capability objects in W3C format and thus allow any of the three arguments to represent the latter.
Param
See
https://w3c.github.io/webdriver/#new-session
Remarks
The shape of this method is strange because it used to support both JSONWP and W3C capabilities. This will likely change in the future to simplify.
Parameters
Name | Type |
---|---|
desiredCapabilities? |
W3CCapabilities <any , void > |
requiredCapabilities? |
W3CCapabilities <any , void > |
capabilities? |
W3CCapabilities <any , void > |
Response
[string
, Partial
<ConstraintsToCaps
<any
> & void
>]
GET
/session/:sessionId
Get the data for the current session
Response
SingularSessionData
<typeof BASE_DESIRED_CAP_CONSTRAINTS
, void
>
A session data object
DELETE
/session/:sessionId
Get the data for the current session
Response
SingularSessionData
<typeof BASE_DESIRED_CAP_CONSTRAINTS
, void
>
A session data object
POST
/session/:sessionId/appium/app/reset
Reset the current session (run the delete session and create session subroutines)
Deprecated
Use explicit session management commands instead
Response
void
POST
/session/:sessionId/appium/events
Get a list of events that have occurred in the current session
Param
filter the returned events by including one or more types
Parameters
Name | Type |
---|---|
type? |
string | string [] |
Response
EventHistory
| Record
<string
, number
>
The event history for the session
POST
/session/:sessionId/appium/log_event
Add a custom-named event to the Appium event log
Param
the name of the vendor or tool the event belongs to, to namespace the event
Parameters
Name | Type |
---|---|
vendor |
string |
event |
string |
Response
void
POST
/session/:sessionId/appium/settings
Get the current settings for the session
Required Parameters
settings
Response
StringRecord
The settings object
GET
/session/:sessionId/appium/settings
Get the current settings for the session
Response
StringRecord
The settings object
POST
/session/:sessionId/element
Find a UI element given a locator strategy and a selector, erroring if it can't be found
See
https://w3c.github.io/webdriver/#find-element
Param
the locator strategy
Parameters
Name | Type |
---|---|
using |
string |
value |
string |
Response
Element
The element object encoding the element id which can be used in element-related commands
POST
/session/:sessionId/element/:elementId/element
Find a UI element given a locator strategy and a selector, erroring if it can't be found. Only look for elements among the set of descendants of a given element
See
https://w3c.github.io/webdriver/#find-element-from-element
Param
the locator strategy
Parameters
Name | Type |
---|---|
using |
string |
value |
string |
Response
Element
The element object encoding the element id which can be used in element-related commands
POST
/session/:sessionId/element/:elementId/elements
Find a a list of all UI elements matching a given a locator strategy and a selector. Only look for elements among the set of descendants of a given element
See
https://w3c.github.io/webdriver/#find-elements-from-element
Param
the locator strategy
Parameters
Name | Type |
---|---|
using |
string |
value |
string |
Response
Element
[]
A possibly-empty list of element objects
POST
/session/:sessionId/elements
Find a a list of all UI elements matching a given a locator strategy and a selector
See
https://w3c.github.io/webdriver/#find-elements
Param
the locator strategy
Parameters
Name | Type |
---|---|
using |
string |
value |
string |
Response
Element
[]
A possibly-empty list of element objects
POST
/session/:sessionId/log
Get the log for a given log type.
Param
Name/key of log type as defined in ILogCommands.supportedLogTypes.
Parameters
Name | Type |
---|---|
type |
string |
Response
unknown
[]
GET
/session/:sessionId/log/types
Get available log types as a list of strings
Response
string
[]
POST
/session/:sessionId/se/log
Get the log for a given log type.
Param
Name/key of log type as defined in ILogCommands.supportedLogTypes.
Parameters
Name | Type |
---|---|
type |
string |
Response
unknown
[]
GET
/session/:sessionId/se/log/types
Get available log types as a list of strings
Response
string
[]
POST
/session/:sessionId/shadow/:shadowId/element
Find an element from a shadow root
See
https://w3c.github.io/webdriver/#find-element-from-shadow-root
Param
the locator strategy
Parameters
Name | Type |
---|---|
using |
string |
value |
string |
Response
Element
The element inside the shadow root matching the selector
POST
/session/:sessionId/shadow/:shadowId/elements
Find elements from a shadow root
See
https://w3c.github.io/webdriver/#find-element-from-shadow-root
Param
the locator strategy
Parameters
Name | Type |
---|---|
using |
string |
value |
string |
Response
Element
[]
A possibly empty list of elements inside the shadow root matching the selector
GET
/session/:sessionId/source
Get the current page/app source as HTML/XML
See
https://w3c.github.io/webdriver/#get-page-source
Response
string
The UI hierarchy in a platform-appropriate format (e.g., HTML for a web page)
GET
/session/:sessionId/timeouts
Get the current timeouts
See
https://w3c.github.io/webdriver/#get-timeouts
Response
Record
<string
, number
>
A map of timeout names to ms values
POST
/session/:sessionId/timeouts
Get the current timeouts
See
https://w3c.github.io/webdriver/#get-timeouts
Optional Parameters
type
ms
script
pageLoad
implicit
Response
Record
<string
, number
>
A map of timeout names to ms values
POST
/session/:sessionId/timeouts/implicit_wait
Set the implicit wait timeout
Param
the timeout in ms
Deprecated
Use timeouts
instead
Parameters
Name | Type |
---|---|
ms |
string | number |
Response
void
GET
/sessions
Get data for all sessions running on an Appium server
Response
MultiSessionData
<typeof BASE_DESIRED_CAP_CONSTRAINTS
, void
>[]
A list of session data objects
GET
/status
Summary
Retrieve the server's current status.
Description
Returns information about whether a remote end is in a state in which it can create new sessions and can additionally include arbitrary meta information that is specific to the implementation.
The readiness state is represented by the ready property of the body, which is false if an attempt to create a session at the current time would fail. However, the value true does not guarantee that a New Session command will succeed.
Implementations may optionally include additional meta information as part of the body, but the top-level properties ready and message are reserved and must not be overwritten.
Examples
JavaScript
Python
Java
Ruby
Response
Object