Skip to content

Class: FakeDriver<Thing>

@appium/fake-driver.FakeDriver

Implements

Type parameters

Name Type
Thing any

Hierarchy

  • BaseDriver

  • FakeDriverAlertMixin

  • FakeDriverContextsMixin

  • FakeDriverElementsMixin

  • FakeDriverFindMixin

  • FakeDriverGeneralMixin

FakeDriver

Table of contents

Constructors

Properties

Accessors

Methods

Constructors

constructor

new FakeDriver<Thing>(opts?, shouldValidateCaps?)

Type parameters

Name Type
Thing any

Parameters

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

Overrides

BaseDriver.constructor

Defined in

packages/fake-driver/lib/driver.js:57

Properties

_eventHistory

Protected _eventHistory: EventHistory

Inherited from

BaseDriver._eventHistory

Defined in

packages/base-driver/build/lib/basedriver/core.d.ts:35


_log

Protected _log: AppiumLogger

Inherited from

BaseDriver._log

Defined in

packages/base-driver/build/lib/basedriver/core.d.ts:40


_proxyActive

_proxyActive: boolean

Defined in

packages/fake-driver/lib/driver.js:40


allowInsecure

allowInsecure: string[]

Inherited from

BaseDriver.allowInsecure

Defined in

packages/base-driver/build/lib/basedriver/core.d.ts:27


appModel

appModel: FakeApp

Defined in

packages/fake-driver/lib/driver.js:37


basePath

basePath: string

basePath is used for several purposes, for example in setting up proxying to other drivers, since we need to know what the base path of any incoming request might look like. We set it to the default initially but it is automatically updated during any actual program execution by the routeConfiguringFunction, which is necessarily run as the entrypoint for any Appium server

Inherited from

BaseDriver.basePath

Defined in

packages/base-driver/build/lib/basedriver/core.d.ts:25


caps

caps: DriverCaps<{ app: { isString: true = true; presence: true = true } ; uniqueApp: { isBoolean: true = true } }>

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

Inherited from

BaseDriver.caps

Defined in

packages/fake-driver/lib/driver.js:125


cliArgs

cliArgs: StringRecord & ServerArgs

The set of command line arguments set for this driver

Inherited from

BaseDriver.cliArgs

Defined in

packages/base-driver/build/lib/basedriver/driver.d.ts:4


commandsQueueGuard

Protected commandsQueueGuard: AsyncLock

Inherited from

BaseDriver.commandsQueueGuard

Defined in

packages/base-driver/build/lib/basedriver/core.d.ts:43


curContext

curContext: string

Defined in

packages/fake-driver/lib/driver.js:34


denyInsecure

denyInsecure: string[]

Inherited from

BaseDriver.denyInsecure

Defined in

packages/base-driver/build/lib/basedriver/core.d.ts:28


desiredCapConstraints

Readonly desiredCapConstraints: Object

Type declaration

Name Type
app { isString: true = true; presence: true = true }
app.isString true
app.presence true
uniqueApp { isBoolean: true = true }
uniqueApp.isBoolean true

Overrides

BaseDriver.desiredCapConstraints

Defined in

packages/fake-driver/lib/driver.js:31


elMap

elMap: Record<string, FakeElement>

Defined in

packages/fake-driver/lib/driver.js:55


eventEmitter

eventEmitter: EventEmitter

Inherited from

BaseDriver.eventEmitter

Defined in

packages/base-driver/build/lib/basedriver/core.d.ts:36


fakeThing

fakeThing: null | Thing

Defined in

packages/fake-driver/lib/driver.js:49


focusedElId

focusedElId: null | string

Defined in

packages/fake-driver/lib/driver.js:46


helpers

helpers: DriverHelpers

Inherited from

BaseDriver.helpers

Defined in

packages/base-driver/build/lib/basedriver/core.d.ts:16


implicitWaitMs

implicitWaitMs: number

Inherited from

BaseDriver.implicitWaitMs

Defined in

packages/base-driver/build/lib/basedriver/core.d.ts:30


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
strictCaps NonNullable<undefined | boolean>
tmpDir undefined | string
traceDir undefined | string
useDrivers UseDriversConfig
usePlugins UsePluginsConfig
webhook undefined | string

Inherited from

BaseDriver.initialOpts

Defined in

packages/base-driver/build/lib/basedriver/core.d.ts:15


locatorStrategies

locatorStrategies: string[]

Inherited from

BaseDriver.locatorStrategies

Defined in

packages/base-driver/build/lib/basedriver/core.d.ts:31


managedDrivers

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

Inherited from

BaseDriver.managedDrivers

Defined in

packages/base-driver/build/lib/basedriver/core.d.ts:33


maxElId

maxElId: number

Defined in

packages/fake-driver/lib/driver.js:52


newCommandTimeoutMs

newCommandTimeoutMs: number

Inherited from

BaseDriver.newCommandTimeoutMs

Defined in

packages/base-driver/build/lib/basedriver/core.d.ts:29


noCommandTimer

noCommandTimer: null | Timeout

Inherited from

BaseDriver.noCommandTimer

Defined in

packages/base-driver/build/lib/basedriver/core.d.ts:34


opts

opts: DriverOpts<{ app: { isString: true = true; presence: true = true } ; uniqueApp: { isBoolean: true = true } }>

Inherited from

BaseDriver.opts

Defined in

packages/base-driver/build/lib/basedriver/core.d.ts:14


originalCaps

originalCaps: W3CDriverCaps<{ app: { isString: true = true; presence: true = true } ; uniqueApp: { isBoolean: true = true } }>

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

Inherited from

BaseDriver.originalCaps

Defined in

packages/base-driver/build/lib/basedriver/driver.d.ts:6


protocol

Optional protocol: Protocol

Inherited from

BaseDriver.protocol

Defined in

packages/base-driver/build/lib/basedriver/core.d.ts:51


relaxedSecurityEnabled

relaxedSecurityEnabled: boolean

Inherited from

BaseDriver.relaxedSecurityEnabled

Defined in

packages/base-driver/build/lib/basedriver/core.d.ts:26


server

Optional server: AppiumServer

Inherited from

BaseDriver.server

Defined in

packages/base-driver/build/lib/basedriver/driver.d.ts:8


serverHost

Optional serverHost: string

Inherited from

BaseDriver.serverHost

Defined in

packages/base-driver/build/lib/basedriver/driver.d.ts:9


serverPath

Optional serverPath: string

Inherited from

BaseDriver.serverPath

Defined in

packages/base-driver/build/lib/basedriver/driver.d.ts:11


serverPort

Optional serverPort: number

Inherited from

BaseDriver.serverPort

Defined in

packages/base-driver/build/lib/basedriver/driver.d.ts:10


sessionId

sessionId: null | string

Inherited from

BaseDriver.sessionId

Defined in

packages/base-driver/build/lib/basedriver/core.d.ts:13


settings

settings: DeviceSettings<StringRecord>

settings should be instantiated by drivers which extend BaseDriver, but we set it to an empty DeviceSettings instance here to make sure that the default settings are applied even if an extending driver doesn't utilize the settings functionality itself

Inherited from

BaseDriver.settings

Defined in

packages/base-driver/build/lib/basedriver/core.d.ts:50


shook

shook: boolean

Defined in

packages/fake-driver/lib/driver.js:43


shouldValidateCaps

shouldValidateCaps: boolean

Inherited from

BaseDriver.shouldValidateCaps

Defined in

packages/base-driver/build/lib/basedriver/core.d.ts:42


shutdownUnexpectedly

shutdownUnexpectedly: boolean

Inherited from

BaseDriver.shutdownUnexpectedly

Defined in

packages/base-driver/build/lib/basedriver/core.d.ts:41


supportedLogTypes

supportedLogTypes: Readonly<LogDefRecord>

Definition of the available log types

Inherited from

BaseDriver.supportedLogTypes

Defined in

packages/types/build/lib/driver.d.ts:269


webLocatorStrategies

webLocatorStrategies: string[]

Inherited from

BaseDriver.webLocatorStrategies

Defined in

packages/base-driver/build/lib/basedriver/core.d.ts:32


baseVersion

Static baseVersion: string

Make the basedriver version available so for any driver which inherits from this package, we know which version of basedriver it inherited from

Inherited from

BaseDriver.baseVersion

Defined in

packages/base-driver/build/lib/basedriver/core.d.ts:12


executeMethodMap

Static executeMethodMap: Object

Type declaration

Name Type Description
fake: addition { command: "fakeAddition" = 'fakeAddition'; params: { optional: readonly ["num3"] ; required: readonly ["num1", "num2"] } } -
fake: addition.command "fakeAddition" -
fake: addition.params { optional: readonly ["num3"] ; required: readonly ["num1", "num2"] } -
fake: addition.params.optional readonly ["num3"] -
fake: addition.params.required readonly ["num1", "num2"] -
fake: getDeprecatedCommandsCalled { command: "getDeprecatedCommandsCalled" = 'getDeprecatedCommandsCalled' } -
fake: getDeprecatedCommandsCalled.command "getDeprecatedCommandsCalled" -
fake: getThing { command: "getFakeThing" = 'getFakeThing' } Gets a thing (a fake thing)
fake: getThing.command "getFakeThing" -
fake: setThing { command: "setFakeThing" = 'setFakeThing'; params: { required: readonly ["thing"] } } -
fake: setThing.command "setFakeThing" -
fake: setThing.params { required: readonly ["thing"] } -
fake: setThing.params.required readonly ["thing"] -

Defined in

packages/fake-driver/lib/driver.js:202


newMethodMap

Static newMethodMap: Object

Type declaration

Name Type
/session/:sessionId/deprecated { POST: { command: "callDeprecatedCommand" = 'callDeprecatedCommand'; deprecated: true = true } }
/session/:sessionId/deprecated.POST { command: "callDeprecatedCommand" = 'callDeprecatedCommand'; deprecated: true = true }
/session/:sessionId/deprecated.POST.command "callDeprecatedCommand"
/session/:sessionId/deprecated.POST.deprecated true
/session/:sessionId/doubleclick { POST: { command: "doubleClick" = 'doubleClick' } }
/session/:sessionId/doubleclick.POST { command: "doubleClick" = 'doubleClick' }
/session/:sessionId/doubleclick.POST.command "doubleClick"
/session/:sessionId/fakedriver { GET: { command: "getFakeThing" = 'getFakeThing' } ; POST: { command: "setFakeThing" = 'setFakeThing'; payloadParams: { required: readonly ["thing"] } } }
/session/:sessionId/fakedriver.GET { command: "getFakeThing" = 'getFakeThing' }
/session/:sessionId/fakedriver.GET.command "getFakeThing"
/session/:sessionId/fakedriver.POST { command: "setFakeThing" = 'setFakeThing'; payloadParams: { required: readonly ["thing"] } }
/session/:sessionId/fakedriver.POST.command "setFakeThing"
/session/:sessionId/fakedriver.POST.payloadParams { required: readonly ["thing"] }
/session/:sessionId/fakedriver.POST.payloadParams.required readonly ["thing"]
/session/:sessionId/fakedriverargs { GET: { command: "getFakeDriverArgs" = 'getFakeDriverArgs' } }
/session/:sessionId/fakedriverargs.GET { command: "getFakeDriverArgs" = 'getFakeDriverArgs' }
/session/:sessionId/fakedriverargs.GET.command "getFakeDriverArgs"

Defined in

packages/fake-driver/lib/driver.js:182

Accessors

_desiredCapConstraints

Protected get _desiredCapConstraints(): Readonly<{ app: { isString: true } ; autoLaunch: { isBoolean: true } ; autoWebview: { isBoolean: true } ; automationName: { isString: true } ; eventTimings: { isBoolean: true } ; fullReset: { isBoolean: true } ; language: { isString: true } ; locale: { isString: true } ; newCommandTimeout: { isNumber: true } ; noReset: { isBoolean: true } ; orientation: { inclusion: readonly ["LANDSCAPE", "PORTRAIT"] } ; platformName: { isString: true ; presence: true } ; platformVersion: { isString: true } ; printPageSourceOnFindFailure: { isBoolean: true } ; udid: { isString: true } ; webSocketUrl: { isBoolean: true } } & C>

Contains the base constraints plus whatever the subclass wants to add.

Subclasses shouldn't need to use this. If you need to use this, please create an issue:

See

https://github.com/appium/appium/issues/new

Returns

Readonly<{ app: { isString: true } ; autoLaunch: { isBoolean: true } ; autoWebview: { isBoolean: true } ; automationName: { isString: true } ; eventTimings: { isBoolean: true } ; fullReset: { isBoolean: true } ; language: { isString: true } ; locale: { isString: true } ; newCommandTimeout: { isNumber: true } ; noReset: { isBoolean: true } ; orientation: { inclusion: readonly ["LANDSCAPE", "PORTRAIT"] } ; platformName: { isString: true ; presence: true } ; platformVersion: { isString: true } ; printPageSourceOnFindFailure: { isBoolean: true } ; udid: { isString: true } ; webSocketUrl: { isBoolean: true } } & C>

Inherited from

BaseDriver._desiredCapConstraints

Defined in

packages/base-driver/build/lib/basedriver/driver.d.ts:20


driverData

get driverData(): Object

This property is used by AppiumDriver to store the data of the specific driver sessions. This data can be later used to adjust properties for driver instances running in parallel. Override it in inherited driver classes if necessary.

Returns

Object

Name Type
isUnique boolean

Overrides

BaseDriver.driverData

Defined in

packages/fake-driver/lib/driver.js:130


eventHistory

get eventHistory(): EventHistory

Returns

EventHistory

Inherited from

BaseDriver.eventHistory

Defined in

packages/base-driver/build/lib/basedriver/core.d.ts:83


isCommandsQueueEnabled

get isCommandsQueueEnabled(): boolean

This property controls the way the executeCommand method handles new driver commands received from the client. Override it for inherited classes only in special cases.

Returns

boolean

If the returned value is true (default) then all the commands received by the particular driver instance are going to be put into the queue, so each following command will not be executed until the previous command execution is completed. False value disables that queue, so each driver command is executed independently and does not wait for anything.

Inherited from

BaseDriver.isCommandsQueueEnabled

Defined in

packages/base-driver/build/lib/basedriver/core.d.ts:82


log

get log(): AppiumLogger

Returns

AppiumLogger

Inherited from

BaseDriver.log

Defined in

packages/base-driver/build/lib/basedriver/core.d.ts:53

Methods

addManagedDriver

addManagedDriver(driver): void

Parameters

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

Returns

void

Inherited from

BaseDriver.addManagedDriver

Defined in

packages/base-driver/build/lib/basedriver/core.d.ts:150


assertAlert

assertAlert(): void

Returns

void

Defined in

packages/fake-driver/lib/commands/alert.ts:7


assertFeatureEnabled

assertFeatureEnabled(name): void

Assert that a given feature is enabled and throw a helpful error if it's not

Parameters

Name Type Description
name string name of feature/command

Returns

void

Inherited from

BaseDriver.assertFeatureEnabled

Defined in

packages/base-driver/build/lib/basedriver/core.d.ts:127


assertNoAlert

assertNoAlert(): void

Returns

void

Defined in

packages/fake-driver/lib/commands/alert.ts:6


assertWebviewContext

assertWebviewContext(): void

Returns

void

Defined in

packages/fake-driver/lib/commands/contexts.ts:7


assignServer

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

BaseDriver.assignServer

Defined in

packages/base-driver/build/lib/basedriver/driver.d.ts:30


callDeprecatedCommand

callDeprecatedCommand(): Promise<void>

This is a command that exists just to be an example of a deprecated command

Returns

Promise<void>

Defined in

packages/fake-driver/lib/driver.js:178


canProxy

canProxy(): boolean

Returns

boolean

Overrides

BaseDriver.canProxy

Defined in

packages/fake-driver/lib/driver.js:77


clear

clear(elementId): Promise<void>

Parameters

Name Type
elementId string

Returns

Promise<void>

Defined in

packages/fake-driver/lib/commands/element.ts:17


clearNewCommandTimeout

clearNewCommandTimeout(): Promise<void>

Returns

Promise<void>

Inherited from

BaseDriver.clearNewCommandTimeout

Defined in

packages/base-driver/build/lib/basedriver/core.d.ts:152


click

click(elementId): Promise<void>

Parameters

Name Type
elementId string

Returns

Promise<void>

Defined in

packages/fake-driver/lib/commands/element.ts:18


createSession

createSession(w3cCapabilities1, w3cCapabilities2?, w3cCapabilities3?, driverData?): Promise<[string, FakeDriverCaps]>

Comment for createSession in FakeDriver

Parameters

Name Type Default value Description
w3cCapabilities1 W3CFakeDriverCaps undefined W3C Capabilities
w3cCapabilities2? W3CFakeDriverCaps undefined W3C Capabilities
w3cCapabilities3? W3CFakeDriverCaps undefined W3C Capabilities
driverData? DriverData[] [] Other session data

Returns

Promise<[string, FakeDriverCaps]>

Overrides

BaseDriver.createSession

Defined in

packages/fake-driver/lib/driver.js:107


deleteSession

deleteSession(sessionId?): Promise<void>

Stop an automation session

See

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

Parameters

Name Type Description
sessionId? null | string the id of the session that is to be deleted

Returns

Promise<void>

Inherited from

BaseDriver.deleteSession

Defined in

packages/base-driver/build/lib/basedriver/driver.d.ts:45


doubleClick

doubleClick(): Promise<void>

Returns

Promise<void>

Defined in

packages/fake-driver/lib/commands/general.ts:22


driverForSession

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

method required by MJSONWP in order to determine if the command should be proxied directly to the driver

Parameters

Name Type
sessionId string

Returns

null | Core<Constraints, StringRecord>

Inherited from

BaseDriver.driverForSession

Defined in

packages/base-driver/build/lib/basedriver/core.d.ts:102


elementDisplayed

elementDisplayed(elementId): Promise<boolean>

Parameters

Name Type
elementId string

Returns

Promise<boolean>

Defined in

packages/fake-driver/lib/commands/element.ts:12


elementEnabled

elementEnabled(elementId): Promise<boolean>

Parameters

Name Type
elementId string

Returns

Promise<boolean>

Defined in

packages/fake-driver/lib/commands/element.ts:13


elementSelected

elementSelected(elementId): Promise<boolean>

Parameters

Name Type
elementId string

Returns

Promise<boolean>

Defined in

packages/fake-driver/lib/commands/element.ts:14


ensureFeatureEnabled

ensureFeatureEnabled(name): void

Assert that a given feature is enabled and throw a helpful error if it's not

Deprecated

Parameters

Name Type Description
name string name of feature/command

Returns

void

Inherited from

BaseDriver.ensureFeatureEnabled

Defined in

packages/base-driver/build/lib/basedriver/core.d.ts:120


equalsElement

equalsElement(elementId, otherElementId): Promise<boolean>

Parameters

Name Type
elementId string
otherElementId string

Returns

Promise<boolean>

Defined in

packages/fake-driver/lib/commands/element.ts:23


execute

execute(script, args): Promise<any>

Parameters

Name Type
script string
args any[]

Returns

Promise<any>

Defined in

packages/fake-driver/lib/commands/general.ts:23


executeCommand

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

This is the main command handler for the driver. It wraps command execution with timeout logic, checking that we have a valid session, and ensuring that we execute commands one at a time. This method is called by MJSONWP's express router.

Type parameters

Name Type
T unknown

Parameters

Name Type
cmd string
...args any[]

Returns

Promise<T>

Inherited from

BaseDriver.executeCommand

Defined in

packages/base-driver/build/lib/basedriver/driver.d.ts:27


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

BaseDriver.executeMethod

Defined in

packages/types/build/lib/driver.d.ts:148


fakeAddition

fakeAddition(a, b, c?): Promise<number>

Parameters

Name Type
a number
b number
c? number

Returns

Promise<number>

Defined in

packages/fake-driver/lib/commands/general.ts:24


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

BaseDriver.findElOrEls

Defined in

packages/types/build/lib/driver.d.ts:242

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

BaseDriver.findElOrEls

Defined in

packages/types/build/lib/driver.d.ts:243


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

BaseDriver.findElOrElsWithProcessing

Defined in

packages/types/build/lib/driver.d.ts:255

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

BaseDriver.findElOrElsWithProcessing

Defined in

packages/types/build/lib/driver.d.ts:256


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

BaseDriver.findElement

Defined in

packages/types/build/lib/driver.d.ts:176


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

BaseDriver.findElementFromElement

Defined in

packages/types/build/lib/driver.d.ts:199


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

BaseDriver.findElementFromShadowRoot

Defined in

packages/types/build/lib/driver.d.ts:221


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

BaseDriver.findElements

Defined in

packages/types/build/lib/driver.d.ts:186


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

BaseDriver.findElementsFromElement

Defined in

packages/types/build/lib/driver.d.ts:211


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

BaseDriver.findElementsFromShadowRoot

Defined in

packages/types/build/lib/driver.d.ts:231


getAlertText

getAlertText(): Promise<string>

Returns

Promise<string>

Defined in

packages/fake-driver/lib/commands/alert.ts:9


getAttribute

getAttribute(elementId, attributeName): Promise<string>

Parameters

Name Type
elementId string
attributeName string

Returns

Promise<string>

Defined in

packages/fake-driver/lib/commands/element.ts:20


getContexts

getContexts(): Promise<string[]>

Returns

Promise<string[]>

Defined in

packages/fake-driver/lib/commands/contexts.ts:9


getCssProperty

getCssProperty(elementId, propertyName): Promise<string>

Parameters

Name Type
elementId string
propertyName string

Returns

Promise<string>

Defined in

packages/fake-driver/lib/commands/element.ts:24


getCurrentContext

getCurrentContext(): Promise<string>

Returns

Promise<string>

Defined in

packages/fake-driver/lib/commands/contexts.ts:8


getDeprecatedCommandsCalled

getDeprecatedCommandsCalled(): Promise<string[]>

This is a command that will return a list of deprecated command names called

Returns

Promise<string[]>

Defined in

packages/fake-driver/lib/driver.js:168


getElement

getElement(elementId): FakeElement

Parameters

Name Type
elementId string

Returns

FakeElement

Defined in

packages/fake-driver/lib/commands/element.ts:10


getElementRect

getElementRect(elementId): Promise<Rect>

Parameters

Name Type
elementId string

Returns

Promise<Rect>

Defined in

packages/fake-driver/lib/commands/element.ts:21


getElements

getElements(elementIds): FakeElement[]

Parameters

Name Type
elementIds string[]

Returns

FakeElement[]

Defined in

packages/fake-driver/lib/commands/element.ts:9


getExistingElementForNode

getExistingElementForNode(node): null | string

Parameters

Name Type
node FakeElement

Returns

null | string

Defined in

packages/fake-driver/lib/commands/find.ts:69


getFakeDriverArgs

getFakeDriverArgs(): Promise<StringRecord & ServerArgs>

Get the driver args that were sent in via the CLI

Returns

Promise<StringRecord & ServerArgs>

Defined in

packages/fake-driver/lib/driver.js:158


getFakeThing

getFakeThing(): Promise<null | Thing>

Returns

Promise<null | Thing>

Defined in

packages/fake-driver/lib/driver.js:136


getGeoLocation

getGeoLocation(): Promise<Location>

Returns

Promise<Location>

Defined in

packages/fake-driver/lib/commands/general.ts:12


getLocation

getLocation(elementId): Promise<Position>

Parameters

Name Type
elementId string

Returns

Promise<Position>

Defined in

packages/fake-driver/lib/commands/element.ts:25


getLocationInView

getLocationInView(elementId): Promise<Position>

Parameters

Name Type
elementId string

Returns

Promise<Position>

Defined in

packages/fake-driver/lib/commands/element.ts:26


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 ILogCommands.supportedLogTypes.

Returns

Promise<any>

Inherited from

BaseDriver.getLog

Defined in

packages/types/build/lib/driver.d.ts:279


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

BaseDriver.getLogEvents

Defined in

packages/types/build/lib/driver.d.ts:136


getLogTypes

getLogTypes(): Promise<string[]>

Get available log types as a list of strings

Returns

Promise<string[]>

Inherited from

BaseDriver.getLogTypes

Defined in

packages/types/build/lib/driver.d.ts:273


getManagedDrivers

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

Returns

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

Inherited from

BaseDriver.getManagedDrivers

Defined in

packages/base-driver/build/lib/basedriver/core.d.ts:151


getName

getName(elementId): Promise<string>

Parameters

Name Type
elementId string

Returns

Promise<string>

Defined in

packages/fake-driver/lib/commands/element.ts:11


getOrientation

getOrientation(): Promise<string>

Returns

Promise<string>

Defined in

packages/fake-driver/lib/commands/general.ts:14


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

BaseDriver.getPageSource

Defined in

packages/types/build/lib/driver.d.ts:263


getProxyAvoidList

getProxyAvoidList(sessionId): RouteMatcher[]

Parameters

Name Type
sessionId string

Returns

RouteMatcher[]

Inherited from

BaseDriver.getProxyAvoidList

Defined in

packages/base-driver/build/lib/basedriver/core.d.ts:130


getRawContexts

getRawContexts(): Record<string, any>

Returns

Record<string, any>

Defined in

packages/fake-driver/lib/commands/contexts.ts:6


getScreenshot

getScreenshot(): Promise<string>

Returns

Promise<string>

Defined in

packages/fake-driver/lib/commands/general.ts:16


getSession

getSession(): Promise<SingularSessionData<{ app: { isString: true = true; presence: true = true } ; uniqueApp: { isBoolean: true = true } }, StringRecord>>

Returns capabilities for the session and event history (if applicable)

Returns

Promise<SingularSessionData<{ app: { isString: true = true; presence: true = true } ; uniqueApp: { isBoolean: true = true } }, StringRecord>>

Inherited from

BaseDriver.getSession

Defined in

packages/base-driver/build/lib/basedriver/driver.d.ts:44


getSessions

getSessions(): Promise<MultiSessionData<{ app: { isString: true = true; presence: true = true } ; uniqueApp: { isBoolean: true = true } }>[]>

Get data for all sessions running on an Appium server

Returns

Promise<MultiSessionData<{ app: { isString: true = true; presence: true = true } ; uniqueApp: { isBoolean: true = true } }>[]>

A list of session data objects

Inherited from

BaseDriver.getSessions

Defined in

packages/base-driver/build/lib/basedriver/driver.d.ts:40


getSettings

getSettings(): Promise<StringRecord>

Get the current settings for the session

Returns

Promise<StringRecord>

The settings object

Inherited from

BaseDriver.getSettings

Defined in

packages/base-driver/build/lib/basedriver/driver.d.ts:49


getSize

getSize(elementId): Promise<Size>

Parameters

Name Type
elementId string

Returns

Promise<Size>

Defined in

packages/fake-driver/lib/commands/element.ts:22


getStatus

getStatus(): Promise<{}>

Returns

Promise<{}>

Inherited from

BaseDriver.getStatus

Defined in

packages/base-driver/build/lib/basedriver/core.d.ts:92


getText

getText(elementId): Promise<string>

Parameters

Name Type
elementId string

Returns

Promise<string>

Defined in

packages/fake-driver/lib/commands/element.ts:16


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

BaseDriver.getTimeouts

Defined in

packages/types/build/lib/driver.d.ts:66


getWindowRect

getWindowRect(): Promise<Rect>

Returns

Promise<Rect>

Defined in

packages/fake-driver/lib/commands/general.ts:18


getWindowSize

getWindowSize(): Promise<Size>

Returns

Promise<Size>

Defined in

packages/fake-driver/lib/commands/general.ts:17


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

BaseDriver.implicitWait

Defined in

packages/types/build/lib/driver.d.ts:45


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

BaseDriver.implicitWaitForCondition

Defined in

packages/types/build/lib/driver.d.ts:59


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

BaseDriver.implicitWaitMJSONWP

Defined in

packages/types/build/lib/driver.d.ts:79


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

BaseDriver.implicitWaitW3C

Defined in

packages/types/build/lib/driver.d.ts:72


isFeatureEnabled

isFeatureEnabled(name): boolean

Check whether a given feature is enabled via its name

Parameters

Name Type Description
name string name of feature/command

Returns

boolean

Inherited from

BaseDriver.isFeatureEnabled

Defined in

packages/base-driver/build/lib/basedriver/core.d.ts:112


isMjsonwpProtocol

isMjsonwpProtocol(): boolean

Returns

boolean

Inherited from

BaseDriver.isMjsonwpProtocol

Defined in

packages/base-driver/build/lib/basedriver/core.d.ts:103


isW3CProtocol

isW3CProtocol(): boolean

Returns

boolean

Inherited from

BaseDriver.isW3CProtocol

Defined in

packages/base-driver/build/lib/basedriver/core.d.ts:104


keys

keys(value): Promise<void>

Parameters

Name Type
value string | string[]

Returns

Promise<void>

Defined in

packages/fake-driver/lib/commands/general.ts:10


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

BaseDriver.logCustomEvent

Defined in

packages/types/build/lib/driver.d.ts:128


logEvent

logEvent(eventName): void

API method for driver developers to log timings for important events

Parameters

Name Type
eventName string

Returns

void

Inherited from

BaseDriver.logEvent

Defined in

packages/base-driver/build/lib/basedriver/core.d.ts:87


logExtraCaps

logExtraCaps(caps): void

A helper function to log unrecognized capabilities to the console

Params

caps - the capabilities

Parameters

Name Type
caps ConstraintsToCaps<{ app: { isString: true = true; presence: true = true } ; uniqueApp: { isBoolean: true = true } }>

Returns

void

Inherited from

BaseDriver.logExtraCaps

Defined in

packages/base-driver/build/lib/basedriver/driver.d.ts:46


mobileShake

mobileShake(): Promise<void>

Returns

Promise<void>

Defined in

packages/fake-driver/lib/commands/general.ts:21


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

BaseDriver.newCommandTimeout

Defined in

packages/types/build/lib/driver.d.ts:111


onUnexpectedShutdown

onUnexpectedShutdown(handler): void

Set a callback handler if needed to execute a custom piece of code when the driver is shut down unexpectedly. Multiple calls to this method will cause the handler to be executed mutiple times

Parameters

Name Type Description
handler (...args: any[]) => void The code to be executed on unexpected shutdown. The function may accept one argument, which is the actual error instance, which caused the driver to shut down.

Returns

void

Inherited from

BaseDriver.onUnexpectedShutdown

Defined in

packages/base-driver/build/lib/basedriver/core.d.ts:63


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

BaseDriver.pageLoadTimeoutMJSONWP

Defined in

packages/types/build/lib/driver.d.ts:92


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

BaseDriver.pageLoadTimeoutW3C

Defined in

packages/types/build/lib/driver.d.ts:85


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

BaseDriver.parseTimeoutArgument

Defined in

packages/types/build/lib/driver.d.ts:119


performActions

performActions(actions): Promise<void>

Parameters

Name Type
actions ActionSequence[]

Returns

Promise<void>

Defined in

packages/fake-driver/lib/commands/general.ts:19


postAcceptAlert

postAcceptAlert(): Promise<void>

Returns

Promise<void>

Defined in

packages/fake-driver/lib/commands/alert.ts:13


postDismissAlert

postDismissAlert(): Promise<void>

Returns

Promise<void>

Defined in

packages/fake-driver/lib/commands/alert.ts:14


proxyActive

proxyActive(): boolean

Returns

boolean

Overrides

BaseDriver.proxyActive

Defined in

packages/fake-driver/lib/driver.js:73


proxyCommand

proxyCommand<T>(): Promise<T>

Type parameters

Name Type
T any

Returns

Promise<T>

Defined in

packages/fake-driver/lib/driver.js:94


proxyReqRes

proxyReqRes(req, res): void

Parameters

Name Type
req any
res any

Returns

void

Defined in

packages/fake-driver/lib/driver.js:81


proxyRouteIsAvoided

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

Whether a given command route (expressed as method and url) should not be proxied according to this driver

Parameters

Name Type Description
sessionId string the current sessionId (in case the driver runs multiple session ids and requires it). This is not used in this method but should be made available to overridden methods.
method HTTPMethod HTTP method of the route
url string url of the route
body? any webdriver request body

Returns

boolean

whether the route should be avoided

Inherited from

BaseDriver.proxyRouteIsAvoided

Defined in

packages/base-driver/build/lib/basedriver/core.d.ts:145


releaseActions

releaseActions(): Promise<void>

Returns

Promise<void>

Defined in

packages/fake-driver/lib/commands/general.ts:20


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

BaseDriver.reset

Defined in

packages/base-driver/build/lib/basedriver/driver.d.ts:31


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

BaseDriver.scriptTimeoutMJSONWP

Defined in

packages/types/build/lib/driver.d.ts:105


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

BaseDriver.scriptTimeoutW3C

Defined in

packages/types/build/lib/driver.d.ts:98


sessionExists

sessionExists(sessionId): boolean

method required by MJSONWP in order to determine whether it should respond with an invalid session response

Parameters

Name Type
sessionId string

Returns

boolean

Inherited from

BaseDriver.sessionExists

Defined in

packages/base-driver/build/lib/basedriver/core.d.ts:97


setAlertText

setAlertText(text): Promise<void>

Parameters

Name Type
text string

Returns

Promise<void>

Defined in

packages/fake-driver/lib/commands/alert.ts:11


setContext

setContext(context): Promise<void>

Parameters

Name Type
context string

Returns

Promise<void>

Defined in

packages/fake-driver/lib/commands/contexts.ts:10


setFakeThing

setFakeThing(thing): Promise<null>

Set the 'thing' value (so that it can be retrieved later)

Parameters

Name Type
thing Thing

Returns

Promise<null>

Defined in

packages/fake-driver/lib/driver.js:147


setFrame

setFrame(frame): Promise<void>

Parameters

Name Type
frame null | number

Returns

Promise<void>

Defined in

packages/fake-driver/lib/commands/contexts.ts:11


setGeoLocation

setGeoLocation(location): Promise<Location>

Parameters

Name Type
location Location

Returns

Promise<Location>

Defined in

packages/fake-driver/lib/commands/general.ts:11


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

BaseDriver.setImplicitWait

Defined in

packages/types/build/lib/driver.d.ts:51


setNewCommandTimeout

setNewCommandTimeout(ms): void

Set the new command timeout

Parameters

Name Type Description
ms number the timeout in ms

Returns

void

Inherited from

BaseDriver.setNewCommandTimeout

Defined in

packages/types/build/lib/driver.d.ts:36


setOrientation

setOrientation(orientation): Promise<void>

Parameters

Name Type
orientation Orientation

Returns

Promise<void>

Defined in

packages/fake-driver/lib/commands/general.ts:15


setProtocolMJSONWP

setProtocolMJSONWP(): void

Returns

void

Inherited from

BaseDriver.setProtocolMJSONWP

Defined in

packages/base-driver/build/lib/basedriver/core.d.ts:105


setProtocolW3C

setProtocolW3C(): void

Returns

void

Inherited from

BaseDriver.setProtocolW3C

Defined in

packages/base-driver/build/lib/basedriver/core.d.ts:106


setValue

setValue(keys, value): Promise<void>

Parameters

Name Type
keys string | string[]
value string

Returns

Promise<void>

Defined in

packages/fake-driver/lib/commands/element.ts:15


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

BaseDriver.startNewCommandTimeout

Defined in

packages/base-driver/build/lib/basedriver/driver.d.ts:29


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

BaseDriver.startUnexpectedShutdown

Defined in

packages/base-driver/build/lib/basedriver/driver.d.ts:28


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

BaseDriver.timeouts

Defined in

packages/types/build/lib/driver.d.ts:30


title

title(): Promise<string>

Returns

Promise<string>

Defined in

packages/fake-driver/lib/commands/general.ts:9


updateSettings

updateSettings(newSettings): Promise<void>

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

Parameters

Name Type Description
newSettings StringRecord 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

BaseDriver.updateSettings

Defined in

packages/base-driver/build/lib/basedriver/driver.d.ts:48


validateDesiredCaps

validateDesiredCaps(caps): caps is DriverCaps<Object>

Validate the capabilities used to start a session

Parameters

Name Type Description
caps any the capabilities

Returns

caps is DriverCaps<Object>

Whether or not the capabilities are valid

Inherited from

BaseDriver.validateDesiredCaps

Defined in

packages/base-driver/build/lib/basedriver/driver.d.ts:47


validateLocatorStrategy

validateLocatorStrategy(strategy, webContext?): void

Parameters

Name Type
strategy string
webContext? boolean

Returns

void

Inherited from

BaseDriver.validateLocatorStrategy

Defined in

packages/base-driver/build/lib/basedriver/core.d.ts:128


wrapNewEl

wrapNewEl(obj): Element<string>

Parameters

Name Type
obj FakeElement

Returns

Element<string>

Defined in

packages/fake-driver/lib/commands/find.ts:70


fakeRoute

Static fakeRoute(req, res): void

Parameters

Name Type
req any
res any

Returns

void

Defined in

packages/fake-driver/lib/driver.js:222


updateServer

Static updateServer(expressApp, httpServer, cliArgs): Promise<void>

Parameters

Name Type
expressApp any
httpServer any
cliArgs any

Returns

Promise<void>

Defined in

packages/fake-driver/lib/driver.js:226