Skip to content

Interface: ExternalDriver<C, Ctx>

@appium/types.ExternalDriver

External drivers must subclass BaseDriver, and can implement any of these methods. None of these are implemented within Appium itself.

Type parameters

Name Type
C extends Constraints = Constraints
Ctx string

Hierarchy

ExternalDriver

Table of contents

Properties

Methods

Properties

allowInsecure

allowInsecure: string[]

Inherited from

Driver.allowInsecure

Defined in

node_modules/@appium/types/lib/driver.ts:603


basePath

basePath: string

Inherited from

Driver.basePath

Defined in

node_modules/@appium/types/lib/driver.ts:601


caps

Optional caps: ConstraintsToCaps<C>

The processed capabilities used to start the session represented by the current driver instance

Inherited from

Driver.caps

Defined in

node_modules/@appium/types/lib/driver.ts:735


cliArgs

cliArgs: StringRecord<any>

The set of command line arguments set for this driver

Inherited from

Driver.cliArgs

Defined in

node_modules/@appium/types/lib/driver.ts:691


denyInsecure

denyInsecure: string[]

Inherited from

Driver.denyInsecure

Defined in

node_modules/@appium/types/lib/driver.ts:604


desiredCapConstraints

desiredCapConstraints: C

The constraints object used to validate capabilities

Inherited from

Driver.desiredCapConstraints

Defined in

node_modules/@appium/types/lib/driver.ts:745


driverData

driverData: DriverData

Inherited from

Driver.driverData

Defined in

node_modules/@appium/types/lib/driver.ts:612


eventEmitter

eventEmitter: EventEmitter

Inherited from

Driver.eventEmitter

Defined in

node_modules/@appium/types/lib/driver.ts:609


eventHistory

eventHistory: EventHistory

Inherited from

Driver.eventHistory

Defined in

node_modules/@appium/types/lib/driver.ts:614


helpers

helpers: DriverHelpers

Inherited from

Driver.helpers

Defined in

node_modules/@appium/types/lib/driver.ts:600


implicitWaitMs

implicitWaitMs: number

Inherited from

Driver.implicitWaitMs

Defined in

node_modules/@appium/types/lib/driver.ts:606


initialOpts

initialOpts: Partial<DriverOpts<C>>

Inherited from

Driver.initialOpts

Defined in

node_modules/@appium/types/lib/driver.ts:598


isCommandsQueueEnabled

isCommandsQueueEnabled: boolean

Inherited from

Driver.isCommandsQueueEnabled

Defined in

node_modules/@appium/types/lib/driver.ts:613


locatorStrategies

locatorStrategies: string[]

Inherited from

Driver.locatorStrategies

Defined in

node_modules/@appium/types/lib/driver.ts:607


log

log: AppiumLogger

Inherited from

Driver.log

Defined in

node_modules/@appium/types/lib/driver.ts:611


newCommandTimeoutMs

newCommandTimeoutMs: number

Inherited from

Driver.newCommandTimeoutMs

Defined in

node_modules/@appium/types/lib/driver.ts:605


opts

opts: DriverOpts<C>

Inherited from

Driver.opts

Defined in

node_modules/@appium/types/lib/driver.ts:597


originalCaps

Optional originalCaps: W3CCapabilities<C>

The original capabilities used to start the session represented by the current driver instance

Inherited from

Driver.originalCaps

Defined in

node_modules/@appium/types/lib/driver.ts:740


protocol

Optional protocol: string

Inherited from

Driver.protocol

Defined in

node_modules/@appium/types/lib/driver.ts:599


relaxedSecurityEnabled

relaxedSecurityEnabled: boolean

Inherited from

Driver.relaxedSecurityEnabled

Defined in

node_modules/@appium/types/lib/driver.ts:602


server

Optional server: AppiumServer

Inherited from

Driver.server

Defined in

node_modules/@appium/types/lib/driver.ts:693


serverHost

Optional serverHost: string

Inherited from

Driver.serverHost

Defined in

node_modules/@appium/types/lib/driver.ts:694


serverPath

Optional serverPath: string

Inherited from

Driver.serverPath

Defined in

node_modules/@appium/types/lib/driver.ts:696


serverPort

Optional serverPort: number

Inherited from

Driver.serverPort

Defined in

node_modules/@appium/types/lib/driver.ts:695


sessionId

sessionId: null | string

Inherited from

Driver.sessionId

Defined in

node_modules/@appium/types/lib/driver.ts:596


settings

settings: IDeviceSettings<StringRecord<any>>

Inherited from

Driver.settings

Defined in

node_modules/@appium/types/lib/driver.ts:610


shouldValidateCaps

shouldValidateCaps: boolean

Inherited from

Driver.shouldValidateCaps

Defined in

node_modules/@appium/types/lib/driver.ts:595


supportedLogTypes

supportedLogTypes: Readonly<LogDefRecord>

Definition of the available log types

Inherited from

Driver.supportedLogTypes

Defined in

node_modules/@appium/types/lib/driver.ts:338


updateSettings

updateSettings: (settings: StringRecord<any>) => Promise<void>

Type declaration

▸ (settings): Promise<void>

Update the session's settings dictionary with a new settings object

Parameters
Name Type Description
settings StringRecord<any> A key-value map of setting names to values. Settings not named in the map will not have their value adjusted.
Returns

Promise<void>

Inherited from

Driver.updateSettings

Defined in

node_modules/@appium/types/lib/driver.ts:385


webLocatorStrategies

webLocatorStrategies: string[]

Inherited from

Driver.webLocatorStrategies

Defined in

node_modules/@appium/types/lib/driver.ts:608

Methods

activateApp

Optional activateApp(appId, options?): Promise<void>

Launch an app

Parameters

Name Type Description
appId string the package or bundle ID of the application
options? unknown driver-specific launch options

Returns

Promise<void>

Defined in

node_modules/@appium/types/lib/driver.ts:1439


activateIMEEngine

Optional activateIMEEngine(engine): Promise<void>

Activate an IME engine

Deprecated

Parameters

Name Type Description
engine string the name of the engine

Returns

Promise<void>

Defined in

node_modules/@appium/types/lib/driver.ts:1689


active

Optional active(): Promise<Element<string>>

Get the active element

See

https://w3c.github.io/webdriver/#get-active-element

Returns

Promise<Element<string>>

The JSON object encapsulating the active element reference

Defined in

node_modules/@appium/types/lib/driver.ts:947


addAuthCredential

Optional addAuthCredential(credentialId, isResidentCredential, rpId, privateKey, userHandle, signCount, authenticatorId): Promise<void>

Inject a public key credential source into a virtual authenticator

See

https://www.w3.org/TR/webauthn-2/#sctn-automation-add-credential

Parameters

Name Type Description
credentialId string the base64 encoded credential ID
isResidentCredential boolean if true, a client-side credential, otherwise a server-side credential
rpId string the relying party ID the credential is scoped to
privateKey string the base64 encoded private key package
userHandle string the base64 encoded user handle
signCount number the initial value for a signature counter
authenticatorId string -

Returns

Promise<void>

Defined in

node_modules/@appium/types/lib/driver.ts:1951


addManagedDriver

addManagedDriver(driver): void

Parameters

Name Type
driver Driver<Constraints, StringRecord<any>, StringRecord<any>, DefaultCreateSessionResult<Constraints>, void>

Returns

void

Inherited from

Driver.addManagedDriver

Defined in

node_modules/@appium/types/lib/driver.ts:658


addVirtualAuthenticator

Optional addVirtualAuthenticator(protocol, transport, hasResidentKey?, hasUserVerification?, isUserConsenting?, isUserVerified?): Promise<string>

Add a virtual authenticator to a browser

See

https://www.w3.org/TR/webauthn-2/#sctn-automation-add-virtual-authenticator

Parameters

Name Type Description
protocol "ctap/u2f" | "ctap2" | "ctap2_1" the protocol
transport string a valid AuthenticatorTransport value
hasResidentKey? boolean whether there is a resident key
hasUserVerification? boolean whether the authenticator has user verification
isUserConsenting? boolean whether it is a user consenting authenticator
isUserVerified? boolean whether the user is verified

Returns

Promise<string>

The authenticator ID

Defined in

node_modules/@appium/types/lib/driver.ts:1922


assertFeatureEnabled

assertFeatureEnabled(name): void

Parameters

Name Type
name string

Returns

void

Inherited from

Driver.assertFeatureEnabled

Defined in

node_modules/@appium/types/lib/driver.ts:652


assignServer

Optional assignServer(server, host, port, path): void

A helper function used to assign server information to the driver instance so the driver knows where the server is Running

Parameters

Name Type Description
server AppiumServer the server object
host string the server hostname
port number the server port
path string the server base url

Returns

void

Inherited from

Driver.assignServer

Defined in

node_modules/@appium/types/lib/driver.ts:776


availableIMEEngines

Optional availableIMEEngines(): Promise<string[]>

Get the list of IME engines

Deprecated

Returns

Promise<string[]>

The list of IME engines

Defined in

node_modules/@appium/types/lib/driver.ts:1651


back

Optional back(): Promise<void>

Navigate back in the page history

See

https://w3c.github.io/webdriver/#back

Returns

Promise<void>

Defined in

node_modules/@appium/types/lib/driver.ts:807


buttonDown

Optional buttonDown(button?): Promise<void>

Trigger a mouse button down

Deprecated

Use the Actions API instead

Parameters

Name Type Description
button? number the button ID

Returns

Promise<void>

Defined in

node_modules/@appium/types/lib/driver.ts:1713


buttonUp

Optional buttonUp(button?): Promise<void>

Trigger a mouse button up

Deprecated

Use the Actions API instead

Parameters

Name Type Description
button? number the button ID

Returns

Promise<void>

Defined in

node_modules/@appium/types/lib/driver.ts:1723


canProxy

canProxy(sessionId?): boolean

Parameters

Name Type
sessionId? string

Returns

boolean

Inherited from

Driver.canProxy

Defined in

node_modules/@appium/types/lib/driver.ts:656


clear

Optional clear(elementId): Promise<void>

Clear the text/value of an editable element

See

https://w3c.github.io/webdriver/#element-clear

Parameters

Name Type Description
elementId string the id of the element

Returns

Promise<void>

Defined in

node_modules/@appium/types/lib/driver.ts:1086


clearNewCommandTimeout

clearNewCommandTimeout(): Promise<void>

Returns

Promise<void>

Inherited from

Driver.clearNewCommandTimeout

Defined in

node_modules/@appium/types/lib/driver.ts:660


click

Optional click(elementId): Promise<void>

Click/tap an element

See

https://w3c.github.io/webdriver/#element-click

Parameters

Name Type Description
elementId string the id of the element

Returns

Promise<void>

Defined in

node_modules/@appium/types/lib/driver.ts:1078


clickCurrent

Optional clickCurrent(button?): Promise<void>

Click the current mouse location

Deprecated

Use the Actions API instead

Parameters

Name Type Description
button? number the button ID

Returns

Promise<void>

Defined in

node_modules/@appium/types/lib/driver.ts:1733


closeWindow

Optional closeWindow(): Promise<string[]>

Close the current browsing context (window)

See

https://w3c.github.io/webdriver/#close-window

Returns

Promise<string[]>

An array of window handles representing currently-open windows

Defined in

node_modules/@appium/types/lib/driver.ts:854


createNewWindow

Optional createNewWindow(type?): Promise<NewWindow>

Create a new browser window

See

https://w3c.github.io/webdriver/#new-window

Parameters

Name Type Description
type? NewWindowType a hint to the driver whether to create a "tab" or "window"

Returns

Promise<NewWindow>

An object containing the handle of the newly created window and its type

Defined in

node_modules/@appium/types/lib/driver.ts:880


createSession

createSession(w3cCaps1, w3cCaps2?, w3cCaps3?, driverData?): Promise<DefaultCreateSessionResult<C>>

Start a new automation session

See

https://w3c.github.io/webdriver/#new-session

Parameters

Name Type Description
w3cCaps1 W3CDriverCaps<C> the new session capabilities
w3cCaps2? W3CDriverCaps<C> another place the new session capabilities could be sent (typically left undefined)
w3cCaps3? W3CDriverCaps<C> another place the new session capabilities could be sent (typically left undefined)
driverData? DriverData[] a list of DriverData objects representing other sessions running for this driver on the same Appium server. This information can be used to help ensure no conflict of resources

Returns

Promise<DefaultCreateSessionResult<C>>

The capabilities object representing the created session

Inherited from

Driver.createSession

Defined in

node_modules/@appium/types/lib/driver.ts:433


deactivateIMEEngine

Optional deactivateIMEEngine(): Promise<void>

Deactivate an IME engine

Deprecated

Returns

Promise<void>

Defined in

node_modules/@appium/types/lib/driver.ts:1679


deleteCookie

Optional deleteCookie(name): Promise<void>

Delete a named cookie

See

https://w3c.github.io/webdriver/#delete-cookie

Parameters

Name Type Description
name string the name of the cookie to delete

Returns

Promise<void>

Defined in

node_modules/@appium/types/lib/driver.ts:1155


deleteCookies

Optional deleteCookies(): Promise<void>

Delete all cookies

See

https://w3c.github.io/webdriver/#delete-all-cookies

Returns

Promise<void>

Defined in

node_modules/@appium/types/lib/driver.ts:1161


deleteSession

deleteSession(sessionId?, driverData?): Promise<void>

Stop an automation session

See

https://w3c.github.io/webdriver/#delete-session

Parameters

Name Type Description
sessionId? string the id of the session that is to be deleted
driverData? DriverData[] the driver data for other currently-running sessions

Returns

Promise<void>

Inherited from

Driver.deleteSession

Defined in

node_modules/@appium/types/lib/driver.ts:447


doubleClick

Optional doubleClick(): Promise<void>

Double-click the current mouse location

Deprecated

Use the Actions API instead

Returns

Promise<void>

Defined in

node_modules/@appium/types/lib/driver.ts:1741


driverForSession

driverForSession(sessionId): null | Core<C, StringRecord<any>>

Parameters

Name Type
sessionId string

Returns

null | Core<C, StringRecord<any>>

Inherited from

Driver.driverForSession

Defined in

node_modules/@appium/types/lib/driver.ts:662


elementDisplayed

Optional elementDisplayed(elementId): Promise<boolean>

Determine whether an element is displayed

See

https://w3c.github.io/webdriver/#element-displayedness

Parameters

Name Type Description
elementId string the id of the element

Returns

Promise<boolean>

True if any part of the element is rendered within the viewport, False otherwise

Defined in

node_modules/@appium/types/lib/driver.ts:1070


elementEnabled

Optional elementEnabled(elementId): Promise<boolean>

Determine whether an element is enabled

See

https://w3c.github.io/webdriver/#is-element-enabled

Parameters

Name Type Description
elementId string the id of the element

Returns

Promise<boolean>

True if the element is enabled, False otherwise

Defined in

node_modules/@appium/types/lib/driver.ts:1040


elementSelected

Optional elementSelected(elementId): Promise<boolean>

Determine if the reference element is selected or not

See

https://w3c.github.io/webdriver/#is-element-selected

Parameters

Name Type Description
elementId string the id of the element

Returns

Promise<boolean>

True if the element is selected, False otherwise

Defined in

node_modules/@appium/types/lib/driver.ts:967


elementShadowRoot

Optional elementShadowRoot(elementId): Promise<Element<string>>

Get the shadow root of an element

See

https://w3c.github.io/webdriver/#get-element-shadow-root

Parameters

Name Type Description
elementId string the id of the element to retrieve the shadow root for

Returns

Promise<Element<string>>

The shadow root for an element, as an element

Defined in

node_modules/@appium/types/lib/driver.ts:957


endCoverage

Optional endCoverage(intent, path): Promise<void>

End platform-specific code coverage tracing

Deprecated

Parameters

Name Type Description
intent string the Android intent for the coverage activity
path string the path to place the results

Returns

Promise<void>

Defined in

node_modules/@appium/types/lib/driver.ts:1617


equalsElement

Optional equalsElement(elementId, otherElementId): Promise<boolean>

Check whether two elements are identical

Deprecated

Parameters

Name Type Description
elementId string the first element's ID
otherElementId string the second element's ID

Returns

Promise<boolean>

True if the elements are equal, false otherwise

Defined in

node_modules/@appium/types/lib/driver.ts:1642


execute

Optional execute(script, args): Promise<unknown>

Execute JavaScript (or some other kind of script) in the browser/app context

See

https://w3c.github.io/webdriver/#execute-script

Parameters

Name Type Description
script string the string to be evaluated as the script, which will be made the body of an anonymous function in the case of JS
args unknown[] the list of arguments to be applied to the script as a function

Returns

Promise<unknown>

The return value of the script execution

Defined in

node_modules/@appium/types/lib/driver.ts:1107


executeAsync

Optional executeAsync(script, args): Promise<unknown>

Execute JavaScript (or some other kind of script) in the browser/app context, asynchronously

See

https://w3c.github.io/webdriver/#execute-async-script

Parameters

Name Type Description
script string the string to be evaluated as the script, which will be made the body of an anonymous function in the case of JS
args unknown[] the list of arguments to be applied to the script as a function

Returns

Promise<unknown>

The promise resolution of the return value of the script execution (or an error object if the promise is rejected)

Defined in

node_modules/@appium/types/lib/driver.ts:1120


executeCdp

Optional executeCdp(cmd, params): Promise<unknown>

Execute a devtools command

Parameters

Name Type Description
cmd string the command
params unknown any command-specific command parameters

Returns

Promise<unknown>

The result of the command execution

Defined in

node_modules/@appium/types/lib/driver.ts:1905


executeCommand

executeCommand(cmd, ...args): Promise<any>

Execute a driver (WebDriver-protocol) command by its name as defined in the routes file

Parameters

Name Type Description
cmd string the name of the command
...args any[] arguments to pass to the command

Returns

Promise<any>

The result of running the command

Inherited from

Driver.executeCommand

Defined in

node_modules/@appium/types/lib/driver.ts:708


executeMethod

executeMethod<TArgs, TReturn>(script, args): Promise<TReturn>

Call an Execute Method by its name with the given arguments. This method will check that the driver has registered the method matching the name, and send it the arguments.

Type parameters

Name Type
TArgs extends readonly any[] | readonly [StringRecord<unknown>] = unknown[]
TReturn unknown

Parameters

Name Type Description
script string the name of the Execute Method
args TArgs a singleton array containing an arguments object

Returns

Promise<TReturn>

The result of calling the Execute Method

Inherited from

Driver.executeMethod

Defined in

node_modules/@appium/types/lib/driver.ts:186


findElOrEls

findElOrEls<Mult, Ctx>(strategy, selector, mult, context?): Promise<Mult extends true ? Element<string>[] : Element<string>>

A helper method that returns one or more UI elements based on the search criteria

Type parameters

Name Type
Mult extends boolean
Ctx any

Parameters

Name Type Description
strategy string the locator strategy
selector string the selector
mult Mult whether or not we want to find multiple elements
context? Ctx the element to use as the search context basis if desiredCapabilities

Returns

Promise<Mult extends true ? Element<string>[] : Element<string>>

A single element or list of elements

Inherited from

Driver.findElOrEls

Defined in

node_modules/@appium/types/lib/driver.ts:300


findElOrElsWithProcessing

findElOrElsWithProcessing<Mult, Ctx>(strategy, selector, mult, context?): Promise<Mult extends true ? Element<string>[] : Element<string>>

This is a wrapper for findElOrEls that validates locator strategies and implements the appium:printPageSourceOnFindFailure capability

Type parameters

Name Type
Mult extends boolean
Ctx any

Parameters

Name Type Description
strategy string the locator strategy
selector string the selector
mult Mult whether or not we want to find multiple elements
context? Ctx the element to use as the search context basis if desiredCapabilities

Returns

Promise<Mult extends true ? Element<string>[] : Element<string>>

A single element or list of elements

Inherited from

Driver.findElOrElsWithProcessing

Defined in

node_modules/@appium/types/lib/driver.ts:318


findElement

findElement(strategy, selector): Promise<Element<string>>

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

Parameters

Name Type Description
strategy string the locator strategy
selector string the selector to combine with the strategy to find the specific element

Returns

Promise<Element<string>>

The element object encoding the element id which can be used in element-related commands

Inherited from

Driver.findElement

Defined in

node_modules/@appium/types/lib/driver.ts:216


findElementFromElement

findElementFromElement(strategy, selector, elementId): Promise<Element<string>>

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

Parameters

Name Type Description
strategy string the locator strategy
selector string the selector to combine with the strategy to find the specific element
elementId string the id of the element to use as the search basis

Returns

Promise<Element<string>>

The element object encoding the element id which can be used in element-related commands

Inherited from

Driver.findElementFromElement

Defined in

node_modules/@appium/types/lib/driver.ts:241


findElementFromShadowRoot

Optional findElementFromShadowRoot(strategy, selector, shadowId): Promise<Element<string>>

Find an element from a shadow root

See

https://w3c.github.io/webdriver/#find-element-from-shadow-root

Parameters

Name Type Description
strategy string the locator strategy
selector string the selector to combine with the strategy to find the specific elements
shadowId string the id of the element to use as the search basis

Returns

Promise<Element<string>>

The element inside the shadow root matching the selector

Inherited from

Driver.findElementFromShadowRoot

Defined in

node_modules/@appium/types/lib/driver.ts:269


findElements

findElements(strategy, selector): Promise<Element<string>[]>

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

Parameters

Name Type Description
strategy string the locator strategy
selector string the selector to combine with the strategy to find the specific elements

Returns

Promise<Element<string>[]>

A possibly-empty list of element objects

Inherited from

Driver.findElements

Defined in

node_modules/@appium/types/lib/driver.ts:227


findElementsFromElement

findElementsFromElement(strategy, selector, elementId): Promise<Element<string>[]>

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

Parameters

Name Type Description
strategy string the locator strategy
selector string the selector to combine with the strategy to find the specific elements
elementId string the id of the element to use as the search basis

Returns

Promise<Element<string>[]>

A possibly-empty list of element objects

Inherited from

Driver.findElementsFromElement

Defined in

node_modules/@appium/types/lib/driver.ts:254


findElementsFromShadowRoot

Optional findElementsFromShadowRoot(strategy, selector, shadowId): Promise<Element<string>[]>

Find elements from a shadow root

See

https://w3c.github.io/webdriver/#find-element-from-shadow-root

Parameters

Name Type Description
strategy string the locator strategy
selector string the selector to combine with the strategy to find the specific elements
shadowId string the id of the element to use as the search basis

Returns

Promise<Element<string>[]>

A possibly empty list of elements inside the shadow root matching the selector

Inherited from

Driver.findElementsFromShadowRoot

Defined in

node_modules/@appium/types/lib/driver.ts:284


fingerprint

Optional fingerprint(fingerprintId): Promise<void>

Apply a synthetic fingerprint to the fingerprint detector of the device

Deprecated

Parameters

Name Type Description
fingerprintId number the numeric ID of the fingerprint to use

Returns

Promise<void>

Defined in

node_modules/@appium/types/lib/driver.ts:1296


flick

Optional flick(element?, xSpeed?, ySpeed?, xOffset?, yOffset?, speed?): Promise<void>

Perform a flick event at the location specified

Deprecated

Use the Actions API instead

Parameters

Name Type Description
element? string the element to make coordinates relative to
xSpeed? number the horizontal flick speed (in driver-specific units)
ySpeed? number the vertical flick speed (in driver-specific units)
xOffset? number the x coordinate
yOffset? number the y coordinate
speed? number the speed (unclear how this relates to xSpeed and ySpeed)

Returns

Promise<void>

Defined in

node_modules/@appium/types/lib/driver.ts:1799


forward

Optional forward(): Promise<void>

Navigate forward in the page history

See

https://w3c.github.io/webdriver/#forward

Returns

Promise<void>

Defined in

node_modules/@appium/types/lib/driver.ts:813


fullScreenWindow

Optional fullScreenWindow(): Promise<Rect>

Put the current window into full screen mode

See

https://w3c.github.io/webdriver/#fullscreen-window

Returns

Promise<Rect>

The actual Rect of the window after running the command

Defined in

node_modules/@appium/types/lib/driver.ts:939


getActiveIMEEngine

Optional getActiveIMEEngine(): Promise<string>

Get the active IME engine

Deprecated

Returns

Promise<string>

The name of the active engine

Defined in

node_modules/@appium/types/lib/driver.ts:1661


getAlertText

Optional getAlertText(): Promise<null | string>

Get the text of the displayed alert

See

https://w3c.github.io/webdriver/#get-alert-text

Returns

Promise<null | string>

The text of the alert

Defined in

node_modules/@appium/types/lib/driver.ts:1195


getAttribute

Optional getAttribute(name, elementId): Promise<null | string>

Retrieve the value of an element's attribute

See

https://w3c.github.io/webdriver/#get-element-attribute

Parameters

Name Type Description
name string the attribute name
elementId string the id of the element

Returns

Promise<null | string>

The attribute value

Defined in

node_modules/@appium/types/lib/driver.ts:978


getAuthCredential

Optional getAuthCredential(): Promise<Credential[]>

Get the list of public key credential sources

See

https://www.w3.org/TR/webauthn-2/#sctn-automation-get-credentials

Returns

Promise<Credential[]>

The list of Credentials

Defined in

node_modules/@appium/types/lib/driver.ts:1967


getComputedLabel

Optional getComputedLabel(elementId): Promise<null | string>

Get the accessible name/label of an element

See

https://w3c.github.io/webdriver/#get-computed-label

Parameters

Name Type Description
elementId string the id of the element

Returns

Promise<null | string>

The accessible name

Defined in

node_modules/@appium/types/lib/driver.ts:1060


getComputedRole

Optional getComputedRole(elementId): Promise<null | string>

Get the WAI-ARIA role of an element

See

https://w3c.github.io/webdriver/#get-computed-role

Parameters

Name Type Description
elementId string the id of the element

Returns

Promise<null | string>

The role

Defined in

node_modules/@appium/types/lib/driver.ts:1050


getContexts

Optional getContexts(): Promise<Ctx[]>

Get the list of available contexts

See

https://github.com/SeleniumHQ/mobile-spec/blob/master/spec-draft.md#webviews-and-other-contexts

Returns

Promise<Ctx[]>

The list of context names

Defined in

node_modules/@appium/types/lib/driver.ts:1846


getCookie

Optional getCookie(name): Promise<Cookie>

Get a cookie by name

See

https://w3c.github.io/webdriver/#get-named-cookie

Parameters

Name Type Description
name string the name of the cookie

Returns

Promise<Cookie>

A serialized cookie

Defined in

node_modules/@appium/types/lib/driver.ts:1138


getCookies

Optional getCookies(): Promise<Cookie[]>

Get all cookies known to the browsing context

See

https://w3c.github.io/webdriver/#get-all-cookies

Returns

Promise<Cookie[]>

A list of serialized cookies

Defined in

node_modules/@appium/types/lib/driver.ts:1128


getCssProperty

Optional getCssProperty(name, elementId): Promise<string>

Retrieve the value of a CSS property of an element

See

https://w3c.github.io/webdriver/#get-element-css-value

Parameters

Name Type Description
name string the CSS property name
elementId string the id of the element

Returns

Promise<string>

The property value

Defined in

node_modules/@appium/types/lib/driver.ts:1000


getCurrentActivity

Optional getCurrentActivity(): Promise<string>

Get the current activity name

Deprecated

Returns

Promise<string>

The activity name

Defined in

node_modules/@appium/types/lib/driver.ts:1413


getCurrentContext

Optional getCurrentContext(): Promise<null | Ctx>

Get the currently active context

See

https://github.com/SeleniumHQ/mobile-spec/blob/master/spec-draft.md#webviews-and-other-contexts

Returns

Promise<null | Ctx>

The context name

Defined in

node_modules/@appium/types/lib/driver.ts:1830


getCurrentPackage

Optional getCurrentPackage(): Promise<string>

Get the current active app package name/id

Deprecated

Returns

Promise<string>

The package name

Defined in

node_modules/@appium/types/lib/driver.ts:1423


getDeviceTime

Optional getDeviceTime(format?): Promise<string>

Get the current time on the device under timeouts

Parameters

Name Type Description
format? string the date/time format you would like the response into

Returns

Promise<string>

The formatted time

Defined in

node_modules/@appium/types/lib/driver.ts:1232


getDisplayDensity

Optional getDisplayDensity(): Promise<number>

Get the display's pixel density

Deprecated

Returns

Promise<number>

The density

Defined in

node_modules/@appium/types/lib/driver.ts:1606


getElementRect

Optional getElementRect(elementId): Promise<Rect>

Get the dimensions and position of an element

See

https://w3c.github.io/webdriver/#get-element-rect

Parameters

Name Type Description
elementId string the id of the element

Returns

Promise<Rect>

The Rect object containing x, y, width, and height properties

Defined in

node_modules/@appium/types/lib/driver.ts:1030


getElementScreenshot

Optional getElementScreenshot(elementId): Promise<string>

Get an image of a single element as rendered on screen

See

https://w3c.github.io/webdriver/#take-element-screenshot

Parameters

Name Type Description
elementId string the id of the element

Returns

Promise<string>

A base64-encoded string representing the PNG image data for the element rect

Defined in

node_modules/@appium/types/lib/driver.ts:1221


getGeoLocation

Optional getGeoLocation(): Promise<Location>

Get the virtual or real geographical location of a device

Returns

Promise<Location>

The location

Defined in

node_modules/@appium/types/lib/driver.ts:1813


getLog

getLog(logType): Promise<unknown[]>

Get the log for a given log type.

Parameters

Name Type Description
logType string Name/key of log type as defined in supportedLogTypes.

Returns

Promise<unknown[]>

Inherited from

Driver.getLog

Defined in

node_modules/@appium/types/lib/driver.ts:350


getLogEvents

getLogEvents(type?): Promise<EventHistory | Record<string, number>>

Get a list of events that have occurred in the current session

Parameters

Name Type Description
type? string | string[] filter the returned events by including one or more types

Returns

Promise<EventHistory | Record<string, number>>

The event history for the session

Inherited from

Driver.getLogEvents

Defined in

node_modules/@appium/types/lib/driver.ts:157


getLogTypes

getLogTypes(): Promise<string[]>

Get available log types as a list of strings

Returns

Promise<string[]>

Inherited from

Driver.getLogTypes

Defined in

node_modules/@appium/types/lib/driver.ts:343


getManagedDrivers

getManagedDrivers(): Driver<Constraints, StringRecord<any>, StringRecord<any>, DefaultCreateSessionResult<Constraints>, void>[]

Returns

Driver<Constraints, StringRecord<any>, StringRecord<any>, DefaultCreateSessionResult<Constraints>, void>[]

Inherited from

Driver.getManagedDrivers

Defined in

node_modules/@appium/types/lib/driver.ts:659


getName

Optional getName(elementId): Promise<string>

Get the tag name of an element

See

https://w3c.github.io/webdriver/#get-element-tag-name

Parameters

Name Type Description
elementId string the id of the element

Returns

Promise<string>

The tag name

Defined in

node_modules/@appium/types/lib/driver.ts:1020


getNetworkConnection

Optional getNetworkConnection(): Promise<number>

Get the network connection state of a device

See

https://github.com/SeleniumHQ/mobile-spec/blob/master/spec-draft.md#device-modes

Returns

Promise<number>

A number which is a bitmask representing categories like Data, Wifi, and Airplane mode status

Defined in

node_modules/@appium/types/lib/driver.ts:1867


getOrientation

Optional getOrientation(): Promise<string>

Get the device orientation

Returns

Promise<string>

The orientation string

Defined in

node_modules/@appium/types/lib/driver.ts:1696


getPageIndex

Optional getPageIndex(elementId): Promise<string>

Get the index of an element on the page

Deprecated

Parameters

Name Type Description
elementId string the element id

Returns

Promise<string>

The page index

Defined in

node_modules/@appium/types/lib/driver.ts:1858


getPageSource

getPageSource(): Promise<string>

Get the current page/app source as HTML/XML

See

https://w3c.github.io/webdriver/#get-page-source

Returns

Promise<string>

The UI hierarchy in a platform-appropriate format (e.g., HTML for a web page)

Inherited from

Driver.getPageSource

Defined in

node_modules/@appium/types/lib/driver.ts:331


getPerformanceData

Optional getPerformanceData(packageName, dataType, dataReadTimeout?): Promise<string[]>

Get the list of performance data associated with a given type

Deprecated

Parameters

Name Type Description
packageName string the package name / id of the app to retrieve data for
dataType string the performance data type; one of those retrieved in a call to getPerformanceDataTypes
dataReadTimeout? number how long to wait for data before timing out

Returns

Promise<string[]>

A list of performance data strings

Defined in

node_modules/@appium/types/lib/driver.ts:1258


getPerformanceDataTypes

Optional getPerformanceDataTypes(): Promise<string[]>

List the performance data types supported by this driver, which can be used in a call to get the performance data by type.

Deprecated

Returns

Promise<string[]>

The list of types

Defined in

node_modules/@appium/types/lib/driver.ts:1243


getProperty

Optional getProperty(name, elementId): Promise<null | string>

Retrieve the value of a named property of an element's JS object

See

https://w3c.github.io/webdriver/#get-element-property

Parameters

Name Type Description
name string the object property name
elementId string the id of the element

Returns

Promise<null | string>

The property value

Defined in

node_modules/@appium/types/lib/driver.ts:989


getProxyAvoidList

getProxyAvoidList(sessionId?): RouteMatcher[]

Parameters

Name Type
sessionId? string

Returns

RouteMatcher[]

Inherited from

Driver.getProxyAvoidList

Defined in

node_modules/@appium/types/lib/driver.ts:655


getRotation

Optional getRotation(): Promise<Rotation>

Get the current rotation state of the device

See

https://github.com/SeleniumHQ/mobile-spec/blob/master/spec-draft.md#device-rotation

Returns

Promise<Rotation>

The Rotation object consisting of x, y, and z rotation values (0 <= n <= 360)

Defined in

node_modules/@appium/types/lib/driver.ts:1883


getScreenshot

Optional getScreenshot(): Promise<string>

Get a screenshot of the current document as rendered

See

https://w3c.github.io/webdriver/#take-screenshot

Returns

Promise<string>

A base64-encoded string representing the PNG image data

Defined in

node_modules/@appium/types/lib/driver.ts:1211


getSession

getSession<C>(): Promise<SingularSessionData<C>>

Get the data for the current session

Type parameters

Name Type
C extends Constraints

Returns

Promise<SingularSessionData<C>>

A session data object

Inherited from

Driver.getSession

Defined in

node_modules/@appium/types/lib/driver.ts:173


getSessions

getSessions(): Promise<MultiSessionData<Constraints>[]>

Get data for all sessions running on an Appium server

Returns

Promise<MultiSessionData<Constraints>[]>

A list of session data objects

Inherited from

Driver.getSessions

Defined in

node_modules/@appium/types/lib/driver.ts:166


getSettings

getSettings(): Promise<StringRecord<any>>

Get the current settings for the session

Returns

Promise<StringRecord<any>>

The settings object

Inherited from

Driver.getSettings

Defined in

node_modules/@appium/types/lib/driver.ts:392


getStatus

getStatus(): Promise<any>

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.

Example

// webdriver.io example
await driver.status();
driver.get_status()
driver.getStatus();
# ruby_lib example
remote_status

# ruby_lib_core example
@driver.remote_status

Returns

Promise<any>

Inherited from

Driver.getStatus

Defined in

node_modules/@appium/types/lib/driver.ts:647


getSystemBars

Optional getSystemBars(): Promise<unknown[]>

Get information from the system bars of a device

Deprecated

Returns

Promise<unknown[]>

An array of information objects of driver-specific shape

Defined in

node_modules/@appium/types/lib/driver.ts:1596


getText

Optional getText(elementId): Promise<string>

Get the text of an element as rendered

See

https://w3c.github.io/webdriver/#get-element-text

Parameters

Name Type Description
elementId string the id of the element

Returns

Promise<string>

The text rendered for the element

Defined in

node_modules/@appium/types/lib/driver.ts:1010


getTimeouts

getTimeouts(): Promise<Record<string, number>>

Get the current timeouts

See

https://w3c.github.io/webdriver/#get-timeouts

Returns

Promise<Record<string, number>>

A map of timeout names to ms values

Inherited from

Driver.getTimeouts

Defined in

node_modules/@appium/types/lib/driver.ts:77


getUrl

Optional getUrl(): Promise<string>

Get the current url

See

https://w3c.github.io/webdriver/#get-current-url

Returns

Promise<string>

The url

Defined in

node_modules/@appium/types/lib/driver.ts:801


getWindowHandle

Optional getWindowHandle(): Promise<string>

Get the handle (id) associated with the current browser window

See

https://w3c.github.io/webdriver/#get-window-handle

Returns

Promise<string>

The handle string

Defined in

node_modules/@appium/types/lib/driver.ts:846


getWindowHandles

Optional getWindowHandles(): Promise<string[]>

Get a set of handles representing open browser windows

See

https://w3c.github.io/webdriver/#get-window-handles

Returns

Promise<string[]>

An array of window handles representing currently-open windows

Defined in

node_modules/@appium/types/lib/driver.ts:870


getWindowRect

Optional getWindowRect(): Promise<Rect>

Get the size and position of the current window

See

https://w3c.github.io/webdriver/#get-window-rect

Returns

Promise<Rect>

A Rect JSON object with x, y, width, and height properties

Defined in

node_modules/@appium/types/lib/driver.ts:902


gsmCall

Optional gsmCall(phoneNumber, action): Promise<void>

Simulate triggering a phone call from a phone number and having the device take an action in response

Deprecated

Parameters

Name Type Description
phoneNumber string the number to pretend the call is from
action string the action to take in response (accept, reject, etc...)

Returns

Promise<void>

Defined in

node_modules/@appium/types/lib/driver.ts:1319


gsmSignal

Optional gsmSignal(signalStrength): Promise<void>

Simulate setting the GSM signal strength for a cell phone

Deprecated

Parameters

Name Type
signalStrength string

Returns

Promise<void>

Defined in

node_modules/@appium/types/lib/driver.ts:1329


gsmVoice

Optional gsmVoice(state): Promise<void>

Do something with GSM voice (unclear; this should not be implemented anywhere)

Deprecated

Parameters

Name Type Description
state string the state

Returns

Promise<void>

Defined in

node_modules/@appium/types/lib/driver.ts:1339


hideKeyboard

Optional hideKeyboard(strategy?, key?, keyCode?, keyName?): Promise<void>

Attempt to hide a virtual keyboard

Parameters

Name Type Description
strategy? string the driver-specific name of a hiding strategy to follow
key? string the text of a key to use to hide the keyboard
keyCode? string a key code to trigger to hide the keyboard
keyName? string the name of a key to use to hide the keyboard

Returns

Promise<void>

Defined in

node_modules/@appium/types/lib/driver.ts:1483


implicitWait

implicitWait(ms): Promise<void>

Set the implicit wait timeout

Deprecated

Use timeouts instead

Parameters

Name Type Description
ms string | number the timeout in ms

Returns

Promise<void>

Inherited from

Driver.implicitWait

Defined in

node_modules/@appium/types/lib/driver.ts:53


implicitWaitForCondition

implicitWaitForCondition(condition): Promise<unknown>

Periodically retry an async function up until the currently set implicit wait timeout

Parameters

Name Type Description
condition (...args: any[]) => Promise<any> the behaviour to retry until it returns truthy

Returns

Promise<unknown>

The return value of the condition

Inherited from

Driver.implicitWaitForCondition

Defined in

node_modules/@appium/types/lib/driver.ts:69


implicitWaitMJSONWP

implicitWaitMJSONWP(ms): Promise<void>

Set the implicit wait value that was sent in via the JSONWP

Deprecated

Parameters

Name Type Description
ms number the timeout in ms

Returns

Promise<void>

Inherited from

Driver.implicitWaitMJSONWP

Defined in

node_modules/@appium/types/lib/driver.ts:92


implicitWaitW3C

implicitWaitW3C(ms): Promise<void>

Set the implicit wait value that was sent in via the W3C protocol

Parameters

Name Type Description
ms number the timeout in ms

Returns

Promise<void>

Inherited from

Driver.implicitWaitW3C

Defined in

node_modules/@appium/types/lib/driver.ts:84


installApp

Optional installApp(appPath, options?): Promise<void>

Install an app on a device

Parameters

Name Type Description
appPath string the absolute path to a local app or a URL of a downloadable app bundle
options? unknown driver-specific install options

Returns

Promise<void>

Defined in

node_modules/@appium/types/lib/driver.ts:1431


isAppInstalled

Optional isAppInstalled(appId): Promise<boolean>

Determine whether an app is installed

Parameters

Name Type Description
appId string the package or bundle ID of the application

Returns

Promise<boolean>

Defined in

node_modules/@appium/types/lib/driver.ts:1462


isFeatureEnabled

isFeatureEnabled(name): boolean

Parameters

Name Type
name string

Returns

boolean

Inherited from

Driver.isFeatureEnabled

Defined in

node_modules/@appium/types/lib/driver.ts:651


isIMEActivated

Optional isIMEActivated(): Promise<boolean>

Determine whether an IME is active

Deprecated

Returns

Promise<boolean>

True if the IME is activated

Defined in

node_modules/@appium/types/lib/driver.ts:1671


isKeyboardShown

Optional isKeyboardShown(): Promise<boolean>

Determine whether the keyboard is shown

Returns

Promise<boolean>

Whether the keyboard is shown

Defined in

node_modules/@appium/types/lib/driver.ts:1490


isMjsonwpProtocol

isMjsonwpProtocol(): boolean

Returns

boolean

Inherited from

Driver.isMjsonwpProtocol

Defined in

node_modules/@appium/types/lib/driver.ts:650


isW3CProtocol

isW3CProtocol(): boolean

Returns

boolean

Inherited from

Driver.isW3CProtocol

Defined in

node_modules/@appium/types/lib/driver.ts:649


keyevent

Optional keyevent(keycode, metastate?): Promise<void>

Simulate a keyevent on the device

Deprecated

Parameters

Name Type Description
keycode string the manufacturer defined keycode
metastate? string the combination of meta startUnexpectedShutdown

Returns

Promise<void>

Defined in

node_modules/@appium/types/lib/driver.ts:1380


logCustomEvent

logCustomEvent(vendor, event): Promise<void>

Add a custom-named event to the Appium event log

Parameters

Name Type Description
vendor string the name of the vendor or tool the event belongs to, to namespace the event
event string the name of the event itself

Returns

Promise<void>

Inherited from

Driver.logCustomEvent

Defined in

node_modules/@appium/types/lib/driver.ts:148


logEvent

logEvent(eventName): void

Parameters

Name Type
eventName string

Returns

void

Inherited from

Driver.logEvent

Defined in

node_modules/@appium/types/lib/driver.ts:661


logExtraCaps

logExtraCaps(caps): void

A helper function to log unrecognized capabilities to the console

Params

caps - the capabilities

Parameters

Name Type
caps DriverCaps<C>

Returns

void

Inherited from

Driver.logExtraCaps

Defined in

node_modules/@appium/types/lib/driver.ts:765


longPressKeyCode

Optional longPressKeyCode(keycode, metastate?, flags?): Promise<void>

Press a device hardware key by its code for a longer duration

Deprecated

Parameters

Name Type Description
keycode number the keycode
metastate? number the code denoting the simultaneous pressing of any meta keys (shift etc)
flags? number the code denoting the combination of extra flags

Returns

Promise<void>

Defined in

node_modules/@appium/types/lib/driver.ts:1286


maximizeWindow

Optional maximizeWindow(): Promise<Rect>

Run the window-manager specific 'maximize' operation on the current window

See

https://w3c.github.io/webdriver/#maximize-window

Returns

Promise<Rect>

The actual Rect of the window after running the command

Defined in

node_modules/@appium/types/lib/driver.ts:923


minimizeWindow

Optional minimizeWindow(): Promise<Rect>

Run the window-manager specific 'minimize' operation on the current window

See

https://w3c.github.io/webdriver/#minimize-window

Returns

Promise<Rect>

The actual Rect of the window after running the command

Defined in

node_modules/@appium/types/lib/driver.ts:931


mobileRotation

Optional mobileRotation(x, y, radius, rotation, touchCount, duration, elementId?): Promise<void>

Construct a rotation gesture? Unclear what this command does and it does not appear to be used

Deprecated

Use setRotation instead

Parameters

Name Type Description
x number the x coordinate of the rotation center
y number the y coordinate of the rotation center
radius number the radius of the rotation circle
rotation number the rotation angle? idk
touchCount number how many fingers to rotate
duration string -
elementId? string if we're rotating around an element

Returns

Promise<void>

Defined in

node_modules/@appium/types/lib/driver.ts:1395


networkSpeed

Optional networkSpeed(netspeed): Promise<void>

Set the network speed of the device

Deprecated

Parameters

Name Type Description
netspeed string the speed as a string, like '3G'

Returns

Promise<void>

Defined in

node_modules/@appium/types/lib/driver.ts:1369


newCommandTimeout

newCommandTimeout(ms): Promise<void>

Set Appium's new command timeout

Parameters

Name Type Description
ms number the timeout in ms

Returns

Promise<void>

Inherited from

Driver.newCommandTimeout

Defined in

node_modules/@appium/types/lib/driver.ts:129


onUnexpectedShutdown

onUnexpectedShutdown(handler): void

Parameters

Name Type
handler () => any

Returns

void

Inherited from

Driver.onUnexpectedShutdown

Defined in

node_modules/@appium/types/lib/driver.ts:615


openNotifications

Optional openNotifications(): Promise<void>

Open the notifications shade/screen

Deprecated

Returns

Promise<void>

Defined in

node_modules/@appium/types/lib/driver.ts:1556


pageLoadTimeoutMJSONWP

pageLoadTimeoutMJSONWP(ms): Promise<void>

Set the page load timeout value that was sent in via the JSONWP

Deprecated

Parameters

Name Type Description
ms number the timeout in ms

Returns

Promise<void>

Inherited from

Driver.pageLoadTimeoutMJSONWP

Defined in

node_modules/@appium/types/lib/driver.ts:107


pageLoadTimeoutW3C

pageLoadTimeoutW3C(ms): Promise<void>

Set the page load timeout value that was sent in via the W3C protocol

Parameters

Name Type Description
ms number the timeout in ms

Returns

Promise<void>

Inherited from

Driver.pageLoadTimeoutW3C

Defined in

node_modules/@appium/types/lib/driver.ts:99


parseTimeoutArgument

parseTimeoutArgument(ms): number

Get a timeout value from a number or a string

Parameters

Name Type Description
ms string | number the timeout value as a number or a string

Returns

number

The timeout as a number in ms

Inherited from

Driver.parseTimeoutArgument

Defined in

node_modules/@appium/types/lib/driver.ts:138


performActions

Optional performActions(actions): Promise<void>

Perform touch or keyboard actions

See

https://w3c.github.io/webdriver/#perform-actions

Parameters

Name Type Description
actions ActionSequence[] the action sequence

Returns

Promise<void>

Defined in

node_modules/@appium/types/lib/driver.ts:1169


postAcceptAlert

Optional postAcceptAlert(): Promise<void>

Accept a simple dialog/alert

See

https://w3c.github.io/webdriver/#accept-alert

Returns

Promise<void>

Defined in

node_modules/@appium/types/lib/driver.ts:1187


postDismissAlert

Optional postDismissAlert(): Promise<void>

Dismiss a simple dialog/alert

See

https://w3c.github.io/webdriver/#dismiss-alert

Returns

Promise<void>

Defined in

node_modules/@appium/types/lib/driver.ts:1181


powerAC

Optional powerAC(state): Promise<void>

Set the AC-connected power state of the device

Deprecated

Parameters

Name Type Description
state string whether the device is connected to power or not

Returns

Promise<void>

Defined in

node_modules/@appium/types/lib/driver.ts:1359


powerCapacity

Optional powerCapacity(percent): Promise<void>

Set the simulated power capacity of the device

Deprecated

Parameters

Name Type Description
percent number how full the battery should become

Returns

Promise<void>

Defined in

node_modules/@appium/types/lib/driver.ts:1349


pressKeyCode

Optional pressKeyCode(keycode, metastate?, flags?): Promise<void>

Press a device hardware key by its code for the default duration

Deprecated

Parameters

Name Type Description
keycode number the keycode
metastate? number the code denoting the simultaneous pressing of any meta keys (shift etc)
flags? number the code denoting the combination of extra flags

Returns

Promise<void>

Defined in

node_modules/@appium/types/lib/driver.ts:1274


proxyActive

proxyActive(sessionId?): boolean

Parameters

Name Type
sessionId? string

Returns

boolean

Inherited from

Driver.proxyActive

Defined in

node_modules/@appium/types/lib/driver.ts:654


proxyCommand

Optional proxyCommand<T>(url, method, body?): Promise<T>

Proxy a command to a connected WebDriver server

Type parameters

Name Type Description
T any the type of the return value

Parameters

Name Type Description
url string the incoming URL
method HTTPMethod the incoming HTTP method
body? string the incoming HTTP body

Returns

Promise<T>

The return value of the proxied command

Defined in

node_modules/@appium/types/lib/driver.ts:2002


proxyRouteIsAvoided

proxyRouteIsAvoided(sessionId, method, url): boolean

Parameters

Name Type
sessionId string
method string
url string

Returns

boolean

Inherited from

Driver.proxyRouteIsAvoided

Defined in

node_modules/@appium/types/lib/driver.ts:657


pullFile

Optional pullFile(path): Promise<string>

Retrieve the data from a file on the device at a given path

Parameters

Name Type Description
path string the remote path on the device to pull file data from

Returns

Promise<string>

The base64-encoded file data

Defined in

node_modules/@appium/types/lib/driver.ts:1507


pullFolder

Optional pullFolder(path): Promise<string>

Retrieve the data from a folder on the device at a given path

Parameters

Name Type Description
path string the remote path of a directory on the device

Returns

Promise<string>

The base64-encoded zip file of the directory contents

Defined in

node_modules/@appium/types/lib/driver.ts:1516


pushFile

Optional pushFile(path, data): Promise<void>

Push data to a file at a remote path on the device

Parameters

Name Type Description
path string the remote path on the device to create the file at
data string the base64-encoded data which will be decoded and written to path

Returns

Promise<void>

Defined in

node_modules/@appium/types/lib/driver.ts:1498


queryAppState

Optional queryAppState(appId): Promise<0 | 2 | 1 | 3 | 4>

Get the running state of an app

Parameters

Name Type Description
appId string the package or bundle ID of the application

Returns

Promise<0 | 2 | 1 | 3 | 4>

A number representing the state. 0 means not installed, 1 means not running, 2 means running in background but suspended, 3 means running in the background, and 4 means running in the foreground

Defined in

node_modules/@appium/types/lib/driver.ts:1473


refresh

Optional refresh(): Promise<void>

Refresh the page

See

https://w3c.github.io/webdriver/#refresh

Returns

Promise<void>

Defined in

node_modules/@appium/types/lib/driver.ts:819


releaseActions

Optional releaseActions(): Promise<void>

Release all keys or buttons that are currently pressed

See

https://w3c.github.io/webdriver/#release-actions

Returns

Promise<void>

Defined in

node_modules/@appium/types/lib/driver.ts:1175


removeAllAuthCredentials

Optional removeAllAuthCredentials(): Promise<void>

Remove all auth credentials

See

https://www.w3.org/TR/webauthn-2/#sctn-automation-remove-all-credentials

Returns

Promise<void>

Defined in

node_modules/@appium/types/lib/driver.ts:1973


removeApp

Optional removeApp(appId, options?): Promise<void>

Remove / uninstall an app

Parameters

Name Type Description
appId string the package or bundle ID of the application
options? unknown driver-specific launch options

Returns

Promise<void>

Defined in

node_modules/@appium/types/lib/driver.ts:1447


removeAuthCredential

Optional removeAuthCredential(credentialId, authenticatorId): Promise<void>

Remove a specific auth credential

Parameters

Name Type Description
credentialId string the credential ID
authenticatorId string the authenticator ID

Returns

Promise<void>

Defined in

node_modules/@appium/types/lib/driver.ts:1981


removeVirtualAuthenticator

Optional removeVirtualAuthenticator(authenticatorId): Promise<void>

Remove a virtual authenticator

See

https://www.w3.org/TR/webauthn-2/#sctn-automation-remove-virtual-authenticator

Parameters

Name Type Description
authenticatorId string the ID returned in the call to add the authenticator

Returns

Promise<void>

Defined in

node_modules/@appium/types/lib/driver.ts:1937


replaceValue

Optional replaceValue(value, elementId): Promise<void>

Set the value of a text field but ensure the current value is replace and not appended

Deprecated

Parameters

Name Type Description
value string the text to set
elementId string the element to set it in

Returns

Promise<void>

Defined in

node_modules/@appium/types/lib/driver.ts:1628


reset

reset(): Promise<void>

Reset the current session (run the delete session and create session subroutines)

Deprecated

Use explicit session management commands instead

Returns

Promise<void>

Inherited from

Driver.reset

Defined in

node_modules/@appium/types/lib/driver.ts:730


scriptTimeoutMJSONWP

scriptTimeoutMJSONWP(ms): Promise<void>

Set the script timeout value that was sent in via the JSONWP

Deprecated

Parameters

Name Type Description
ms number the timeout in ms

Returns

Promise<void>

Inherited from

Driver.scriptTimeoutMJSONWP

Defined in

node_modules/@appium/types/lib/driver.ts:122


scriptTimeoutW3C

scriptTimeoutW3C(ms): Promise<void>

Set the script timeout value that was sent in via the W3C protocol

Parameters

Name Type Description
ms number the timeout in ms

Returns

Promise<void>

Inherited from

Driver.scriptTimeoutW3C

Defined in

node_modules/@appium/types/lib/driver.ts:114


sendSMS

Optional sendSMS(phoneNumber, message): Promise<void>

Simulate sending an SMS message from a certain phone number to the device

Deprecated

Parameters

Name Type Description
phoneNumber string the number to pretend the message is from
message string the SMS text

Returns

Promise<void>

Defined in

node_modules/@appium/types/lib/driver.ts:1307


sessionExists

sessionExists(sessionId?): boolean

Parameters

Name Type
sessionId? string

Returns

boolean

Inherited from

Driver.sessionExists

Defined in

node_modules/@appium/types/lib/driver.ts:648


setAlertText

Optional setAlertText(text): Promise<void>

Set the text field of an alert prompt

See

https://w3c.github.io/webdriver/#send-alert-text

Parameters

Name Type Description
text string the text to send to the prompt

Returns

Promise<void>

Defined in

node_modules/@appium/types/lib/driver.ts:1203


setContext

Optional setContext(name, ...args): Promise<void>

Switch to a context by name

See

https://github.com/SeleniumHQ/mobile-spec/blob/master/spec-draft.md#webviews-and-other-contexts

Parameters

Name Type Description
name string the context name
...args any[] -

Returns

Promise<void>

Defined in

node_modules/@appium/types/lib/driver.ts:1838


setCookie

Optional setCookie(cookie): Promise<void>

Add a cookie to the browsing context

See

https://w3c.github.io/webdriver/#add-cookie

Parameters

Name Type Description
cookie Cookie the cookie data including properties like name, value, path, domain, secure, httpOnly, expiry, and samesite

Returns

Promise<void>

Defined in

node_modules/@appium/types/lib/driver.ts:1147


setFrame

Optional setFrame(id): Promise<void>

Switch the current browsing context to a frame

See

https://w3c.github.io/webdriver/#switch-to-frame

Parameters

Name Type Description
id null | string | number the frame id, index, or null (indicating the top-level context)

Returns

Promise<void>

Defined in

node_modules/@appium/types/lib/driver.ts:888


setGeoLocation

Optional setGeoLocation(location): Promise<void>

Set the virtual geographical location of a device

Parameters

Name Type Description
location Partial<Location> the location including latitude and longitude

Returns

Promise<void>

Defined in

node_modules/@appium/types/lib/driver.ts:1820


setImplicitWait

setImplicitWait(ms): void

A helper method (not a command) used to set the implicit wait value

Parameters

Name Type Description
ms number the implicit wait in ms

Returns

void

Inherited from

Driver.setImplicitWait

Defined in

node_modules/@appium/types/lib/driver.ts:60


setNetworkConnection

Optional setNetworkConnection(type): Promise<void>

Set the network connection of the device

See

https://github.com/SeleniumHQ/mobile-spec/blob/master/spec-draft.md#device-modes

Parameters

Name Type Description
type number the bitmask representing network state

Returns

Promise<void>

Defined in

node_modules/@appium/types/lib/driver.ts:1875


setNewCommandTimeout

setNewCommandTimeout(ms): void

Set the new command timeout

Parameters

Name Type Description
ms number the timeout in ms

Returns

void

Inherited from

Driver.setNewCommandTimeout

Defined in

node_modules/@appium/types/lib/driver.ts:43


setOrientation

Optional setOrientation(orientation): Promise<void>

Set the device orientation

Parameters

Name Type Description
orientation string the orientation string

Returns

Promise<void>

Defined in

node_modules/@appium/types/lib/driver.ts:1703


setRotation

Optional setRotation(x, y, z): Promise<void>

Set the device rotation state

See

https://github.com/SeleniumHQ/mobile-spec/blob/master/spec-draft.md#device-rotation

Parameters

Name Type Description
x number the degree to which the device is rotated around the x axis (0 <= x <= 360)
y number the degree to which the device is rotated around the y axis (0 <= y <= 360)
z number the degree to which the device is rotated around the z axis (0 <= z <= 360)

Returns

Promise<void>

Defined in

node_modules/@appium/types/lib/driver.ts:1893


setUrl

Optional setUrl(url): Promise<void>

Navigate to a given url

See

https://w3c.github.io/webdriver/#navigate-to

Parameters

Name Type Description
url string the url

Returns

Promise<void>

Defined in

node_modules/@appium/types/lib/driver.ts:793


setUserAuthVerified

Optional setUserAuthVerified(isUserVerified, authenticatorId): Promise<void>

Set the isUserVerified property of an authenticator

See

https://www.w3.org/TR/webauthn-2/#sctn-automation-set-user-verified

Parameters

Name Type Description
isUserVerified boolean the value of the isUserVerified property
authenticatorId string the authenticator id

Returns

Promise<void>

Defined in

node_modules/@appium/types/lib/driver.ts:1990


setValue

Optional setValue(text, elementId): Promise<void>

Send keystrokes to an element (or otherwise set its value)

See

https://w3c.github.io/webdriver/#element-send-keys

Parameters

Name Type Description
text string the text to send to the element
elementId string the id of the element

Returns

Promise<void>

Defined in

node_modules/@appium/types/lib/driver.ts:1095


setWindow

Optional setWindow(handle): Promise<void>

Switch to a specified window

See

https://w3c.github.io/webdriver/#switch-to-window

Parameters

Name Type Description
handle string the window handle of the window to make active

Returns

Promise<void>

Defined in

node_modules/@appium/types/lib/driver.ts:862


setWindowRect

Optional setWindowRect(x, y, width, height): Promise<Rect>

Set the current window's size and position

See

https://w3c.github.io/webdriver/#set-window-rect

Parameters

Name Type Description
x number the screen coordinate for the new left edge of the window
y number the screen coordinate for the new top edge of the window
width number the width in pixels to resize the window to
height number the height in pixels to resize the window to

Returns

Promise<Rect>

The actual Rect of the window after running the command

Defined in

node_modules/@appium/types/lib/driver.ts:915


startActivity

Optional startActivity(appPackage, appActivity, appWaitPackage?, appWaitActivity?, intentAction?, intentCategory?, intentFlags?, optionalIntentArguments?, dontStopAppOnReset?): Promise<void>

Start an Android activity within an app

Deprecated

Parameters

Name Type Description
appPackage string the app package id
appActivity string the activity name
appWaitPackage? string the package id to wait for if different from the app package
appWaitActivity? string the activity name to wait for being active if different from appActivity
intentAction? string the action for the intent to use to start the activity
intentCategory? string the category for the intent
intentFlags? string -
optionalIntentArguments? string additional arguments to be passed to launching the intent
dontStopAppOnReset? boolean set to true to not stop the current app before launching the activity

Returns

Promise<void>

Defined in

node_modules/@appium/types/lib/driver.ts:1576


startNewCommandTimeout

startNewCommandTimeout(): Promise<void>

Start the timer for the New Command Timeout, which when it runs out, will stop the current session

Returns

Promise<void>

Inherited from

Driver.startNewCommandTimeout

Defined in

node_modules/@appium/types/lib/driver.ts:722


startUnexpectedShutdown

startUnexpectedShutdown(err?): Promise<void>

Signify to any owning processes that this driver encountered an error which should cause the session to terminate immediately (for example an upstream service failed)

Parameters

Name Type Description
err? Error the Error object which is causing the shutdown

Returns

Promise<void>

Inherited from

Driver.startUnexpectedShutdown

Defined in

node_modules/@appium/types/lib/driver.ts:716


switchToParentFrame

Optional switchToParentFrame(): Promise<void>

Set the current browsing context to the parent of the current context

See

https://w3c.github.io/webdriver/#switch-to-parent-frame

Returns

Promise<void>

Defined in

node_modules/@appium/types/lib/driver.ts:894


terminateApp

Optional terminateApp(appId, options?): Promise<void>

Quit / terminate / stop a running application

Parameters

Name Type Description
appId string the package or bundle ID of the application
options? unknown driver-specific launch options

Returns

Promise<void>

Defined in

node_modules/@appium/types/lib/driver.ts:1455


timeouts

timeouts(type, ms, script?, pageLoad?, implicit?): Promise<void>

Set the various timeouts associated with a session

See

https://w3c.github.io/webdriver/#set-timeouts

Parameters

Name Type Description
type string used only for the old (JSONWP) command, the type of the timeout
ms string | number used only for the old (JSONWP) command, the ms for the timeout
script? number the number in ms for the script timeout, used for the W3C command
pageLoad? number the number in ms for the pageLoad timeout, used for the W3C command
implicit? string | number the number in ms for the implicit wait timeout, used for the W3C command

Returns

Promise<void>

Inherited from

Driver.timeouts

Defined in

node_modules/@appium/types/lib/driver.ts:30


title

Optional title(): Promise<string>

Get the current page title

See

https://w3c.github.io/webdriver/#get-title

Example

await driver.getTitle()
driver.title
driver.getTitle();

Returns

Promise<string>

The title

Defined in

node_modules/@appium/types/lib/driver.ts:838


toggleData

Optional toggleData(): Promise<void>

Toggle cell network data

Deprecated

Returns

Promise<void>

Defined in

node_modules/@appium/types/lib/driver.ts:1532


toggleFlightMode

Optional toggleFlightMode(): Promise<void>

Toggle airplane/flight mode for the device

Deprecated

Returns

Promise<void>

Defined in

node_modules/@appium/types/lib/driver.ts:1524


toggleLocationServices

Optional toggleLocationServices(): Promise<void>

Toggle location services for the device

Deprecated

Returns

Promise<void>

Defined in

node_modules/@appium/types/lib/driver.ts:1548


toggleWiFi

Optional toggleWiFi(): Promise<void>

Toggle WiFi radio status

Deprecated

Returns

Promise<void>

Defined in

node_modules/@appium/types/lib/driver.ts:1540


touchDown

Optional touchDown(x, y): Promise<void>

Perform a touch down event at the location specified

Deprecated

Use the Actions API instead

Parameters

Name Type Description
x number the x coordinate
y number the y coordinate

Returns

Promise<void>

Defined in

node_modules/@appium/types/lib/driver.ts:1752


touchLongClick

Optional touchLongClick(elementId): Promise<void>

Perform a long touch down event at the location specified

Deprecated

Use the Actions API instead

Parameters

Name Type Description
elementId string the id of the element to long touch

Returns

Promise<void>

Defined in

node_modules/@appium/types/lib/driver.ts:1784


touchMove

Optional touchMove(x, y): Promise<void>

Perform a touch move event at the location specified

Deprecated

Use the Actions API instead

Parameters

Name Type Description
x number the x coordinate
y number the y coordinate

Returns

Promise<void>

Defined in

node_modules/@appium/types/lib/driver.ts:1774


touchUp

Optional touchUp(x, y): Promise<void>

Perform a touch up event at the location specified

Deprecated

Use the Actions API instead

Parameters

Name Type Description
x number the x coordinate
y number the y coordinate

Returns

Promise<void>

Defined in

node_modules/@appium/types/lib/driver.ts:1763


validateDesiredCaps

validateDesiredCaps(caps): boolean

Validate the capabilities used to start a session

Parameters

Name Type Description
caps DriverCaps<C> the capabilities

Returns

boolean

Whether or not the capabilities are valid

Inherited from

Driver.validateDesiredCaps

Defined in

node_modules/@appium/types/lib/driver.ts:756


validateLocatorStrategy

validateLocatorStrategy(strategy, webContext?): void

Parameters

Name Type
strategy string
webContext? boolean

Returns

void

Inherited from

Driver.validateLocatorStrategy

Defined in

node_modules/@appium/types/lib/driver.ts:653