Skip to content

Interface: Driver<C, CArgs, Settings, CreateResult, DeleteResult, SessionData>

@appium/types.Driver

BaseDriver implements this. It contains default behavior; external drivers are expected to implement ExternalDriver instead.

C should be the constraints of the driver. CArgs would be the shape of cliArgs. Settings is the shape of the raw device settings object (see IDeviceSettings)

Type parameters

Name Type
C extends Constraints = Constraints
CArgs extends StringRecord = StringRecord
Settings extends StringRecord = StringRecord
CreateResult DefaultCreateSessionResult<C>
DeleteResult DefaultDeleteSessionResult
SessionData extends StringRecord = StringRecord

Hierarchy

Driver

↳↳ ExternalDriver

Table of contents

Properties

Methods

Properties

allowInsecure

allowInsecure: string[]

Inherited from

Core.allowInsecure

Defined in

packages/types/lib/driver.ts:587


basePath

basePath: string

Inherited from

Core.basePath

Defined in

packages/types/lib/driver.ts:585


caps

Optional caps: ConstraintsToCaps<C>

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

Defined in

packages/types/lib/driver.ts:719


cliArgs

cliArgs: CArgs

The set of command line arguments set for this driver

Defined in

packages/types/lib/driver.ts:675


denyInsecure

denyInsecure: string[]

Inherited from

Core.denyInsecure

Defined in

packages/types/lib/driver.ts:588


desiredCapConstraints

desiredCapConstraints: C

The constraints object used to validate capabilities

Defined in

packages/types/lib/driver.ts:729


driverData

driverData: DriverData

Inherited from

Core.driverData

Defined in

packages/types/lib/driver.ts:596


eventEmitter

eventEmitter: EventEmitter

Inherited from

Core.eventEmitter

Defined in

packages/types/lib/driver.ts:593


eventHistory

eventHistory: EventHistory

Inherited from

Core.eventHistory

Defined in

packages/types/lib/driver.ts:598


helpers

helpers: DriverHelpers

Inherited from

Core.helpers

Defined in

packages/types/lib/driver.ts:584


implicitWaitMs

implicitWaitMs: number

Inherited from

Core.implicitWaitMs

Defined in

packages/types/lib/driver.ts:590


initialOpts

initialOpts: Object

Type declaration

Name Type
address string
allowCors NonNullable<undefined | boolean>
allowInsecure AllowInsecureConfig
basePath string
callbackAddress undefined | string
callbackPort number
debugLogSpacing NonNullable<undefined | boolean>
defaultCapabilities undefined | DefaultCapabilitiesConfig
denyInsecure DenyInsecureConfig
driver undefined | DriverConfig
fastReset? boolean
keepAliveTimeout number
localTimezone NonNullable<undefined | boolean>
logFile undefined | string
logFilters undefined | LogFiltersConfig
logNoColors NonNullable<undefined | boolean>
logTimestamp NonNullable<undefined | boolean>
loglevel NonNullable<undefined | LogLevelConfig>
longStacktrace NonNullable<undefined | boolean>
noPermsCheck NonNullable<undefined | boolean>
nodeconfig undefined | NodeconfigConfig
plugin undefined | PluginConfig
port number
relaxedSecurityEnabled NonNullable<undefined | boolean>
sessionOverride NonNullable<undefined | boolean>
skipUninstall? boolean
sslCertificatePath undefined | string
sslKeyPath undefined | string
strictCaps NonNullable<undefined | boolean>
tmpDir undefined | string
traceDir undefined | string
useDrivers UseDriversConfig
usePlugins UsePluginsConfig
webhook undefined | string

Inherited from

Core.initialOpts

Defined in

packages/types/lib/driver.ts:582


isCommandsQueueEnabled

isCommandsQueueEnabled: boolean

Inherited from

Core.isCommandsQueueEnabled

Defined in

packages/types/lib/driver.ts:597


locatorStrategies

locatorStrategies: string[]

Inherited from

Core.locatorStrategies

Defined in

packages/types/lib/driver.ts:591


log

log: AppiumLogger

Inherited from

Core.log

Defined in

packages/types/lib/driver.ts:595


newCommandTimeoutMs

newCommandTimeoutMs: number

Inherited from

Core.newCommandTimeoutMs

Defined in

packages/types/lib/driver.ts:589


opts

opts: DriverOpts<C>

Inherited from

Core.opts

Defined in

packages/types/lib/driver.ts:581


originalCaps

Optional originalCaps: W3CCapabilities<C>

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

Defined in

packages/types/lib/driver.ts:724


protocol

Optional protocol: Protocol

Inherited from

Core.protocol

Defined in

packages/types/lib/driver.ts:583


relaxedSecurityEnabled

relaxedSecurityEnabled: boolean

Inherited from

Core.relaxedSecurityEnabled

Defined in

packages/types/lib/driver.ts:586


server

Optional server: AppiumServer

Defined in

packages/types/lib/driver.ts:677


serverHost

Optional serverHost: string

Defined in

packages/types/lib/driver.ts:678


serverPath

Optional serverPath: string

Defined in

packages/types/lib/driver.ts:680


serverPort

Optional serverPort: number

Defined in

packages/types/lib/driver.ts:679


sessionId

sessionId: null | string

Inherited from

Core.sessionId

Defined in

packages/types/lib/driver.ts:580


settings

settings: IDeviceSettings<Settings>

Inherited from

Core.settings

Defined in

packages/types/lib/driver.ts:594


shouldValidateCaps

shouldValidateCaps: boolean

Inherited from

Core.shouldValidateCaps

Defined in

packages/types/lib/driver.ts:579


supportedLogTypes

supportedLogTypes: Readonly<LogDefRecord>

Definition of the available log types

Inherited from

ILogCommands.supportedLogTypes

Defined in

packages/types/lib/driver.ts:334


updateSettings

updateSettings: (settings: Settings) => Promise<void>

Type declaration

▸ (settings): Promise<void>

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

Parameters
Name Type Description
settings Settings 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

ISettingsCommands.updateSettings

Defined in

packages/types/lib/driver.ts:381


webLocatorStrategies

webLocatorStrategies: string[]

Inherited from

Core.webLocatorStrategies

Defined in

packages/types/lib/driver.ts:592

Methods

addManagedDriver

addManagedDriver(driver): void

Parameters

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

Returns

void

Inherited from

Core.addManagedDriver

Defined in

packages/types/lib/driver.ts:642


assertFeatureEnabled

assertFeatureEnabled(name): void

Parameters

Name Type
name string

Returns

void

Inherited from

Core.assertFeatureEnabled

Defined in

packages/types/lib/driver.ts:636


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

Defined in

packages/types/lib/driver.ts:760


canProxy

canProxy(sessionId?): boolean

Parameters

Name Type
sessionId? string

Returns

boolean

Inherited from

Core.canProxy

Defined in

packages/types/lib/driver.ts:640


clearNewCommandTimeout

clearNewCommandTimeout(): Promise<void>

Returns

Promise<void>

Inherited from

Core.clearNewCommandTimeout

Defined in

packages/types/lib/driver.ts:644


createSession

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

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<CreateResult>

The capabilities object representing the created session

Inherited from

ISessionHandler.createSession

Defined in

packages/types/lib/driver.ts:430


deleteSession

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

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 | DeleteResult>

Inherited from

ISessionHandler.deleteSession

Defined in

packages/types/lib/driver.ts:444


driverForSession

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

Parameters

Name Type
sessionId string

Returns

null | Core<Constraints, StringRecord>

Inherited from

Core.driverForSession

Defined in

packages/types/lib/driver.ts:646


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

Defined in

packages/types/lib/driver.ts:692


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

IExecuteCommands.executeMethod

Defined in

packages/types/lib/driver.ts:170


findElOrEls

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

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

Parameters

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

Returns

Promise<Element<string>[]>

A single element or list of elements

Inherited from

IFindCommands.findElOrEls

Defined in

packages/types/lib/driver.ts:294

findElOrEls(strategy, selector, mult, context?): Promise<Element<string>>

Parameters

Name Type
strategy string
selector string
mult false
context? any

Returns

Promise<Element<string>>

Inherited from

IFindCommands.findElOrEls

Defined in

packages/types/lib/driver.ts:295


findElOrElsWithProcessing

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

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

Parameters

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

Returns

Promise<Element<string>[]>

A single element or list of elements

Inherited from

IFindCommands.findElOrElsWithProcessing

Defined in

packages/types/lib/driver.ts:308

findElOrElsWithProcessing(strategy, selector, mult, context?): Promise<Element<string>>

Parameters

Name Type
strategy string
selector string
mult false
context? any

Returns

Promise<Element<string>>

Inherited from

IFindCommands.findElOrElsWithProcessing

Defined in

packages/types/lib/driver.ts:314


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

IFindCommands.findElement

Defined in

packages/types/lib/driver.ts:210


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

IFindCommands.findElementFromElement

Defined in

packages/types/lib/driver.ts:235


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

IFindCommands.findElementFromShadowRoot

Defined in

packages/types/lib/driver.ts:263


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

IFindCommands.findElements

Defined in

packages/types/lib/driver.ts:221


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

IFindCommands.findElementsFromElement

Defined in

packages/types/lib/driver.ts:248


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

IFindCommands.findElementsFromShadowRoot

Defined in

packages/types/lib/driver.ts:278


getLog

getLog(logType): Promise<any>

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<any>

Inherited from

ILogCommands.getLog

Defined in

packages/types/lib/driver.ts:346


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

IEventCommands.getLogEvents

Defined in

packages/types/lib/driver.ts:157


getLogTypes

getLogTypes(): Promise<string[]>

Get available log types as a list of strings

Returns

Promise<string[]>

Inherited from

ILogCommands.getLogTypes

Defined in

packages/types/lib/driver.ts:339


getManagedDrivers

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

Returns

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

Inherited from

Core.getManagedDrivers

Defined in

packages/types/lib/driver.ts:643


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

IFindCommands.getPageSource

Defined in

packages/types/lib/driver.ts:327


getProxyAvoidList

getProxyAvoidList(sessionId?): RouteMatcher[]

Parameters

Name Type
sessionId? string

Returns

RouteMatcher[]

Inherited from

Core.getProxyAvoidList

Defined in

packages/types/lib/driver.ts:639


getSession

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

Get the data for the current session

Returns

Promise<SingularSessionData<C, SessionData>>

A session data object

Inherited from

ISessionHandler.getSession

Defined in

packages/types/lib/driver.ts:458


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

ISessionHandler.getSessions

Defined in

packages/types/lib/driver.ts:451


getSettings

getSettings(): Promise<Settings>

Get the current settings for the session

Returns

Promise<Settings>

The settings object

Inherited from

ISettingsCommands.getSettings

Defined in

packages/types/lib/driver.ts:388


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

Core.getStatus

Defined in

packages/types/lib/driver.ts:631


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

ITimeoutCommands.getTimeouts

Defined in

packages/types/lib/driver.ts:77


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

ITimeoutCommands.implicitWait

Defined in

packages/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

ITimeoutCommands.implicitWaitForCondition

Defined in

packages/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

ITimeoutCommands.implicitWaitMJSONWP

Defined in

packages/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

ITimeoutCommands.implicitWaitW3C

Defined in

packages/types/lib/driver.ts:84


isFeatureEnabled

isFeatureEnabled(name): boolean

Parameters

Name Type
name string

Returns

boolean

Inherited from

Core.isFeatureEnabled

Defined in

packages/types/lib/driver.ts:635


isMjsonwpProtocol

isMjsonwpProtocol(): boolean

Returns

boolean

Inherited from

Core.isMjsonwpProtocol

Defined in

packages/types/lib/driver.ts:634


isW3CProtocol

isW3CProtocol(): boolean

Returns

boolean

Inherited from

Core.isW3CProtocol

Defined in

packages/types/lib/driver.ts:633


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

IEventCommands.logCustomEvent

Defined in

packages/types/lib/driver.ts:148


logEvent

logEvent(eventName): void

Parameters

Name Type
eventName string

Returns

void

Inherited from

Core.logEvent

Defined in

packages/types/lib/driver.ts:645


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

Defined in

packages/types/lib/driver.ts:749


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

ITimeoutCommands.newCommandTimeout

Defined in

packages/types/lib/driver.ts:129


onUnexpectedShutdown

onUnexpectedShutdown(handler): void

Parameters

Name Type
handler () => any

Returns

void

Inherited from

Core.onUnexpectedShutdown

Defined in

packages/types/lib/driver.ts:599


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

ITimeoutCommands.pageLoadTimeoutMJSONWP

Defined in

packages/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

ITimeoutCommands.pageLoadTimeoutW3C

Defined in

packages/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

ITimeoutCommands.parseTimeoutArgument

Defined in

packages/types/lib/driver.ts:138


proxyActive

proxyActive(sessionId?): boolean

Parameters

Name Type
sessionId? string

Returns

boolean

Inherited from

Core.proxyActive

Defined in

packages/types/lib/driver.ts:638


proxyRouteIsAvoided

proxyRouteIsAvoided(sessionId, method, url, body?): boolean

Parameters

Name Type
sessionId string
method string
url string
body? any

Returns

boolean

Inherited from

Core.proxyRouteIsAvoided

Defined in

packages/types/lib/driver.ts:641


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>

Defined in

packages/types/lib/driver.ts:714


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

ITimeoutCommands.scriptTimeoutMJSONWP

Defined in

packages/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

ITimeoutCommands.scriptTimeoutW3C

Defined in

packages/types/lib/driver.ts:114


sessionExists

sessionExists(sessionId?): boolean

Parameters

Name Type
sessionId? string

Returns

boolean

Inherited from

Core.sessionExists

Defined in

packages/types/lib/driver.ts:632


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

ITimeoutCommands.setImplicitWait

Defined in

packages/types/lib/driver.ts:60


setNewCommandTimeout

setNewCommandTimeout(ms): void

Set the new command timeout

Parameters

Name Type Description
ms number the timeout in ms

Returns

void

Inherited from

ITimeoutCommands.setNewCommandTimeout

Defined in

packages/types/lib/driver.ts:43


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>

Defined in

packages/types/lib/driver.ts:706


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>

Defined in

packages/types/lib/driver.ts:700


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

ITimeoutCommands.timeouts

Defined in

packages/types/lib/driver.ts:30


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

Defined in

packages/types/lib/driver.ts:740


validateLocatorStrategy

validateLocatorStrategy(strategy, webContext?): void

Parameters

Name Type
strategy string
webContext? boolean

Returns

void

Inherited from

Core.validateLocatorStrategy

Defined in

packages/types/lib/driver.ts:637