Class: FakeDriver
@appium/fake-driver.FakeDriver
Implements
Hierarchy
↳ FakeDriver
Table of contents
Constructors
Properties
- _eventHistory
- _log
- _proxyActive
- allowInsecure
- appModel
- assertAlert
- assertNoAlert
- assertWebviewContext
- basePath
- caps
- clear
- cliArgs
- click
- commandsQueueGuard
- curContext
- denyInsecure
- desiredCapConstraints
- doubleClick
- elMap
- elementDisplayed
- elementEnabled
- elementSelected
- equalsElement
- eventEmitter
- execute
- fakeAddition
- fakeThing
- findElOrEls
- findElement
- findElementFromElement
- findElements
- findElementsFromElement
- focusedElId
- getAlertText
- getAttribute
- getContexts
- getCssProperty
- getCurrentContext
- getElement
- getElementRect
- getElements
- getExistingElementForNode
- getGeoLocation
- getLocation
- getLocationInView
- getLog
- getName
- getOrientation
- getPageSource
- getRawContexts
- getScreenshot
- getSize
- getText
- getWindowRect
- getWindowSize
- helpers
- implicitWaitMs
- initialOpts
- keys
- locatorStrategies
- managedDrivers
- maxElId
- mobileShake
- newCommandTimeoutMs
- noCommandTimer
- opts
- originalCaps
- performActions
- postAcceptAlert
- postDismissAlert
- protocol
- relaxedSecurityEnabled
- releaseActions
- resetOnUnexpectedShutdown
- server
- serverHost
- serverPath
- serverPort
- sessionId
- setAlertText
- setContext
- setFrame
- setGeoLocation
- setOrientation
- setValue
- settings
- shook
- shouldValidateCaps
- shutdownUnexpectedly
- supportedLogTypes
- title
- updateSettings
- webLocatorStrategies
- wrapNewEl
- baseVersion
- executeMethodMap
- newMethodMap
Accessors
Methods
- addManagedDriver
- assertFeatureEnabled
- assignServer
- callDeprecatedCommand
- canProxy
- clearNewCommandTimeout
- createSession
- deleteSession
- driverForSession
- ensureFeatureEnabled
- executeCommand
- executeMethod
- findElOrElsWithProcessing
- findElementFromShadowRoot
- findElementsFromShadowRoot
- getDeprecatedCommandsCalled
- getFakeDriverArgs
- getFakeThing
- getLogEvents
- getLogTypes
- getManagedDrivers
- getProxyAvoidList
- getSession
- getSessions
- getSettings
- getStatus
- getTimeouts
- implicitWait
- implicitWaitForCondition
- implicitWaitMJSONWP
- implicitWaitW3C
- isFeatureEnabled
- isMjsonwpProtocol
- isW3CProtocol
- logCustomEvent
- logEvent
- logExtraCaps
- newCommandTimeout
- onUnexpectedShutdown
- pageLoadTimeoutMJSONWP
- pageLoadTimeoutW3C
- parseTimeoutArgument
- proxyActive
- proxyCommand
- proxyReqRes
- proxyRouteIsAvoided
- reset
- scriptTimeoutMJSONWP
- scriptTimeoutW3C
- sessionExists
- setFakeThing
- setImplicitWait
- setNewCommandTimeout
- setProtocolMJSONWP
- setProtocolW3C
- startNewCommandTimeout
- startUnexpectedShutdown
- timeouts
- validateDesiredCaps
- validateLocatorStrategy
- fakeRoute
- updateServer
Constructors
constructor
• new FakeDriver(opts?
, shouldValidateCaps?
)
Parameters
Name | Type | Default value |
---|---|---|
opts |
Object |
{} |
shouldValidateCaps |
boolean |
true |
Overrides
Defined in
packages/fake-driver/lib/driver.js:33
Properties
_eventHistory
• _eventHistory: EventHistory
Inherited from
Defined in
packages/base-driver/build/lib/basedriver/core.d.ts:67
_log
• _log: AppiumLogger
Inherited from
Defined in
packages/base-driver/build/lib/basedriver/core.d.ts:73
_proxyActive
• _proxyActive: boolean
Defined in
packages/fake-driver/lib/driver.js:40
allowInsecure
• allowInsecure: string
[]
Inherited from
Defined in
packages/base-driver/build/lib/basedriver/core.d.ts:53
appModel
• appModel: FakeApp
Defined in
packages/fake-driver/lib/driver.js:31
assertAlert
• assertAlert: () => void
= alert.assertAlert
Type declaration
▸ (): void
Returns
void
Defined in
packages/fake-driver/lib/driver.js:209
assertNoAlert
• assertNoAlert: () => void
= alert.assertNoAlert
Type declaration
▸ (): void
ALERT *
Returns
void
Defined in
packages/fake-driver/lib/driver.js:208
assertWebviewContext
• assertWebviewContext: () => void
= contexts.assertWebviewContext
Type declaration
▸ (): void
Returns
void
Defined in
packages/fake-driver/lib/driver.js:219
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
Defined in
packages/base-driver/build/lib/basedriver/core.d.ts:50
caps
• caps: Partial
<ConstraintsToCaps
<any
> & void
>
Inherited from
Defined in
packages/fake-driver/lib/driver.js:96
clear
• clear: (elementId
: any
) => Promise
<void
> = element.clear
Type declaration
▸ (elementId
): Promise
<void
>
Parameters
Name | Type |
---|---|
elementId |
any |
Returns
Promise
<void
>
Defined in
packages/fake-driver/lib/driver.js:236
cliArgs
• cliArgs: StringRecord
& ServerArgs
Inherited from
Defined in
packages/base-driver/build/lib/basedriver/driver.d.ts:17
click
• click: (elementId
: string
) => Promise
<void
> = element.click
Type declaration
▸ (elementId
): Promise
<void
>
This comment should be displayed instead of the one from ExternalDriver
Parameters
Name | Type |
---|---|
elementId |
string |
Returns
Promise
<void
>
Defined in
packages/fake-driver/lib/driver.js:237
commandsQueueGuard
• Protected
commandsQueueGuard: AsyncLock
Inherited from
Defined in
packages/base-driver/build/lib/basedriver/core.d.ts:85
curContext
• curContext: string
Defined in
packages/fake-driver/lib/driver.js:29
denyInsecure
• denyInsecure: string
[]
Inherited from
Defined in
packages/base-driver/build/lib/basedriver/core.d.ts:55
desiredCapConstraints
• desiredCapConstraints: Object
= FAKE_DRIVER_CONSTRAINTS
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:26
doubleClick
• doubleClick: () => Promise
<void
> = general.doubleClick
Type declaration
▸ (): Promise
<void
>
Returns
Promise
<void
>
Defined in
packages/fake-driver/lib/driver.js:273
elMap
• elMap: Object
Defined in
packages/fake-driver/lib/driver.js:36
elementDisplayed
• elementDisplayed: (elementId
: any
) => Promise
<any
> = element.elementDisplayed
Type declaration
▸ (elementId
): Promise
<any
>
Parameters
Name | Type |
---|---|
elementId |
any |
Returns
Promise
<any
>
Defined in
packages/fake-driver/lib/driver.js:231
elementEnabled
• elementEnabled: (elementId
: any
) => Promise
<any
> = element.elementEnabled
Type declaration
▸ (elementId
): Promise
<any
>
Parameters
Name | Type |
---|---|
elementId |
any |
Returns
Promise
<any
>
Defined in
packages/fake-driver/lib/driver.js:232
elementSelected
• elementSelected: (elementId
: any
) => Promise
<any
> = element.elementSelected
Type declaration
▸ (elementId
): Promise
<any
>
Parameters
Name | Type |
---|---|
elementId |
any |
Returns
Promise
<any
>
Defined in
packages/fake-driver/lib/driver.js:233
equalsElement
• equalsElement: (el1Id
: any
, el2Id
: any
) => any
= element.equalsElement
Type declaration
▸ (el1Id
, el2Id
): any
Parameters
Name | Type |
---|---|
el1Id |
any |
el2Id |
any |
Returns
any
Defined in
packages/fake-driver/lib/driver.js:241
eventEmitter
• eventEmitter: EventEmitter
Inherited from
Defined in
packages/base-driver/build/lib/basedriver/core.d.ts:69
execute
• execute: (script
: any
, args
: any
) => Promise
<any
> = general.execute
Type declaration
▸ (script
, args
): Promise
<any
>
Parameters
Name | Type |
---|---|
script |
any |
args |
any |
Returns
Promise
<any
>
Defined in
packages/fake-driver/lib/driver.js:274
fakeAddition
• fakeAddition: (num1
: number
, num2
: number
, num3?
: number
) => Promise
<number
> = general.fakeAddition
Type declaration
▸ (num1
, num2
, num3?
): Promise
<number
>
Add two or maybe even three numbers
Parameters
Name | Type | Default value |
---|---|---|
num1 |
number |
undefined |
num2 |
number |
undefined |
num3? |
number |
0 |
Returns
Promise
<number
>
Defined in
packages/fake-driver/lib/driver.js:275
fakeThing
• fakeThing: any
Defined in
packages/fake-driver/lib/driver.js:39
packages/fake-driver/lib/driver.js:120
findElOrEls
• findElOrEls: strategy
: string
, selector
: string
, mult
: Mult
, context?
: Ctx
) => Promise
<Mult
extends true
? Element
[] : Element
> = find.findElOrEls
Type declaration
▸ <Mult
, Ctx
>(strategy
, selector
, mult
, context?
): Promise
<Mult
extends true
? Element
[] : Element
>
Type parameters
Name | Type |
---|---|
Mult |
extends boolean |
Ctx |
any |
Parameters
Name | Type |
---|---|
strategy |
string |
selector |
string |
mult |
Mult |
context? |
Ctx |
Returns
Promise
<Mult
extends true
? Element
[] : Element
>
Overrides
Defined in
packages/fake-driver/lib/driver.js:251
findElement
• findElement: (strategy
: string
, selector
: string
) => Promise
<Element
> = find.findElement
Type declaration
▸ (strategy
, selector
): Promise
<Element
>
This should override whatever's in ExternalDriver
Parameters
Name | Type | Description |
---|---|---|
strategy |
string |
Strategy |
selector |
string |
Selector |
Returns
Promise
<Element
>
Overrides
Defined in
packages/fake-driver/lib/driver.js:252
findElementFromElement
• findElementFromElement: (strategy
: any
, selector
: any
, elementId
: any
) => Promise
<Element
> = find.findElementFromElement
Type declaration
▸ (strategy
, selector
, elementId
): Promise
<Element
>
Parameters
Name | Type |
---|---|
strategy |
any |
selector |
any |
elementId |
any |
Returns
Promise
<Element
>
Overrides
BaseDriver.findElementFromElement
Defined in
packages/fake-driver/lib/driver.js:254
findElements
• findElements: (strategy
: any
, selector
: any
) => Promise
<Element
[]> = find.findElements
Type declaration
▸ (strategy
, selector
): Promise
<Element
[]>
Parameters
Name | Type |
---|---|
strategy |
any |
selector |
any |
Returns
Promise
<Element
[]>
Overrides
Defined in
packages/fake-driver/lib/driver.js:253
findElementsFromElement
• findElementsFromElement: (strategy
: any
, selector
: any
, elementId
: any
) => Promise
<Element
[]> = find.findElementsFromElement
Type declaration
▸ (strategy
, selector
, elementId
): Promise
<Element
[]>
Parameters
Name | Type |
---|---|
strategy |
any |
selector |
any |
elementId |
any |
Returns
Promise
<Element
[]>
Overrides
BaseDriver.findElementsFromElement
Defined in
packages/fake-driver/lib/driver.js:255
focusedElId
• focusedElId: any
Defined in
packages/fake-driver/lib/driver.js:37
getAlertText
• getAlertText: () => Promise
<string
> = alert.getAlertText
Type declaration
▸ (): Promise
<string
>
Get the text of an alert
Returns
Promise
<string
>
Defined in
packages/fake-driver/lib/driver.js:210
getAttribute
• getAttribute: (attr
: any
, elementId
: any
) => Promise
<any
> = element.getAttribute
Type declaration
▸ (attr
, elementId
): Promise
<any
>
Parameters
Name | Type |
---|---|
attr |
any |
elementId |
any |
Returns
Promise
<any
>
Defined in
packages/fake-driver/lib/driver.js:238
getContexts
• getContexts: () => Promise
<string
[]> = contexts.getContexts
Type declaration
▸ (): Promise
<string
[]>
Get the list of available contexts
Returns
Promise
<string
[]>
Defined in
packages/fake-driver/lib/driver.js:221
getCssProperty
• getCssProperty: (prop
: any
, elementId
: any
) => Promise
<any
> = element.getCssProperty
Type declaration
▸ (prop
, elementId
): Promise
<any
>
Parameters
Name | Type |
---|---|
prop |
any |
elementId |
any |
Returns
Promise
<any
>
Defined in
packages/fake-driver/lib/driver.js:242
getCurrentContext
• getCurrentContext: () => Promise
<string
> = contexts.getCurrentContext
Type declaration
▸ (): Promise
<string
>
Returns
Promise
<string
>
Defined in
packages/fake-driver/lib/driver.js:220
getElement
• getElement: (elId
: any
) => any
= element.getElement
Type declaration
▸ (elId
): any
Parameters
Name | Type |
---|---|
elId |
any |
Returns
any
Defined in
packages/fake-driver/lib/driver.js:229
getElementRect
• getElementRect: (elementId
: any
) => any
= element.getElementRect
Type declaration
▸ (elementId
): any
Parameters
Name | Type |
---|---|
elementId |
any |
Returns
any
Defined in
packages/fake-driver/lib/driver.js:239
getElements
• getElements: (elIds
: any
) => any
= element.getElements
Type declaration
▸ (elIds
): any
ELEMENTS *
Parameters
Name | Type |
---|---|
elIds |
any |
Returns
any
Defined in
packages/fake-driver/lib/driver.js:228
getExistingElementForNode
• getExistingElementForNode: (node
: any
) => null
| string
= find.getExistingElementForNode
Type declaration
▸ (node
): null
| string
FIND *
Parameters
Name | Type |
---|---|
node |
any |
Returns
null
| string
Defined in
packages/fake-driver/lib/driver.js:249
getGeoLocation
• getGeoLocation: () => Promise
<Location
> = general.getGeoLocation
Type declaration
▸ (): Promise
<Location
>
Returns
Promise
<Location
>
Defined in
packages/fake-driver/lib/driver.js:263
getLocation
• getLocation: (elementId
: string
) => Promise
<any
> = element.getLocation
Type declaration
▸ (elementId
): Promise
<any
>
Parameters
Name | Type |
---|---|
elementId |
string |
Returns
Promise
<any
>
Defined in
packages/fake-driver/lib/driver.js:243
getLocationInView
• getLocationInView: (elementId
: any
) => Promise
<any
> = element.getLocationInView
Type declaration
▸ (elementId
): Promise
<any
>
Parameters
Name | Type |
---|---|
elementId |
any |
Returns
Promise
<any
>
Defined in
packages/fake-driver/lib/driver.js:244
getLog
• getLog: (type
: any
) => Promise
<any
[]> = general.getLog
Type declaration
▸ (type
): Promise
<any
[]>
Parameters
Name | Type |
---|---|
type |
any |
Returns
Promise
<any
[]>
Overrides
Defined in
packages/fake-driver/lib/driver.js:271
getName
• getName: (elementId
: any
) => Promise
<any
> = element.getName
Type declaration
▸ (elementId
): Promise
<any
>
Parameters
Name | Type |
---|---|
elementId |
any |
Returns
Promise
<any
>
Defined in
packages/fake-driver/lib/driver.js:230
getOrientation
• getOrientation: () => Promise
<string
> = general.getOrientation
Type declaration
▸ (): Promise
<string
>
Returns
Promise
<string
>
Defined in
packages/fake-driver/lib/driver.js:265
getPageSource
• getPageSource: () => Promise
<string
> = general.getPageSource
Type declaration
▸ (): Promise
<string
>
Returns
Promise
<string
>
Overrides
Defined in
packages/fake-driver/lib/driver.js:264
getRawContexts
• getRawContexts: () => { NATIVE_APP
: null
= null; PROXY
: null
= null } = contexts.getRawContexts
Type declaration
▸ (): Object
CONTEXTS *
Returns
Object
Name | Type |
---|---|
NATIVE_APP |
null |
PROXY |
null |
Defined in
packages/fake-driver/lib/driver.js:218
getScreenshot
• getScreenshot: () => Promise
<string
> = general.getScreenshot
Type declaration
▸ (): Promise
<string
>
Returns
Promise
<string
>
Defined in
packages/fake-driver/lib/driver.js:267
getSize
• getSize: (elementId
: any
) => any
= element.getSize
Type declaration
▸ (elementId
): any
Parameters
Name | Type |
---|---|
elementId |
any |
Returns
any
Defined in
packages/fake-driver/lib/driver.js:240
getText
• getText: (elementId
: any
) => Promise
<any
> = element.getText
Type declaration
▸ (elementId
): Promise
<any
>
Parameters
Name | Type |
---|---|
elementId |
any |
Returns
Promise
<any
>
Defined in
packages/fake-driver/lib/driver.js:235
getWindowRect
• getWindowRect: () => Promise
<{ height
: number
; width
: number
; x
: number
= 0; y
: number
= 0 }> = general.getWindowRect
Type declaration
▸ (): Promise
<{ height
: number
; width
: number
; x
: number
= 0; y
: number
= 0 }>
Returns
Promise
<{ height
: number
; width
: number
; x
: number
= 0; y
: number
= 0 }>
Defined in
packages/fake-driver/lib/driver.js:269
getWindowSize
• getWindowSize: () => Promise
<{ height
: number
; width
: number
}> = general.getWindowSize
Type declaration
▸ (): Promise
<{ height
: number
; width
: number
}>
Returns
Promise
<{ height
: number
; width
: number
}>
Defined in
packages/fake-driver/lib/driver.js:268
helpers
• helpers: DriverHelpers
<any
>
Inherited from
Defined in
packages/base-driver/build/lib/basedriver/core.d.ts:41
implicitWaitMs
• implicitWaitMs: number
Inherited from
Defined in
packages/base-driver/build/lib/basedriver/core.d.ts:57
initialOpts
• initialOpts: ServerArgs
Inherited from
Defined in
packages/base-driver/build/lib/basedriver/core.d.ts:40
keys
• keys: (value
: any
) => Promise
<void
> = general.keys
Type declaration
▸ (value
): Promise
<void
>
Parameters
Name | Type |
---|---|
value |
any |
Returns
Promise
<void
>
Defined in
packages/fake-driver/lib/driver.js:261
locatorStrategies
• locatorStrategies: string
[]
Inherited from
Defined in
packages/base-driver/build/lib/basedriver/core.d.ts:59
managedDrivers
• managedDrivers: Driver
<typeof BASE_DESIRED_CAP_CONSTRAINTS
, StringRecord
, any
>[]
Inherited from
Defined in
packages/base-driver/build/lib/basedriver/core.d.ts:63
maxElId
• maxElId: number
Defined in
packages/fake-driver/lib/driver.js:38
mobileShake
• mobileShake: () => Promise
<void
> = general.mobileShake
Type declaration
▸ (): Promise
<void
>
Returns
Promise
<void
>
Defined in
packages/fake-driver/lib/driver.js:272
newCommandTimeoutMs
• newCommandTimeoutMs: number
Inherited from
BaseDriver.newCommandTimeoutMs
Defined in
packages/base-driver/build/lib/basedriver/core.d.ts:56
noCommandTimer
• noCommandTimer: null
| Timeout
Inherited from
Defined in
packages/base-driver/build/lib/basedriver/core.d.ts:65
opts
• opts: ServerArgs
& ExtraDriverOpts
& Partial
<ConstraintsToCaps
<any
>> & Partial
<ConstraintsToCaps
<typeof BASE_DESIRED_CAP_CONSTRAINTS
>>
Inherited from
Defined in
packages/base-driver/build/lib/basedriver/driver.d.ts:33
originalCaps
• originalCaps: W3CCapabilities
<any
, void
>
Inherited from
Defined in
packages/base-driver/build/lib/basedriver/driver.d.ts:25
performActions
• performActions: (actions
: any
) => Promise
<void
> = general.performActions
Type declaration
▸ (actions
): Promise
<void
>
Parameters
Name | Type |
---|---|
actions |
any |
Returns
Promise
<void
>
Defined in
packages/fake-driver/lib/driver.js:270
postAcceptAlert
• postAcceptAlert: () => Promise
<void
> = alert.postAcceptAlert
Type declaration
▸ (): Promise
<void
>
Accept an alert
Returns
Promise
<void
>
Defined in
packages/fake-driver/lib/driver.js:212
postDismissAlert
• postDismissAlert: () => Promise
<void
> = alert.postDismissAlert
Type declaration
▸ (): Promise
<void
>
Dismiss an alert
Returns
Promise
<void
>
Defined in
packages/fake-driver/lib/driver.js:213
protocol
• protocol: undefined
| string
Inherited from
Defined in
packages/base-driver/build/lib/basedriver/core.d.ts:153
relaxedSecurityEnabled
• relaxedSecurityEnabled: boolean
Inherited from
BaseDriver.relaxedSecurityEnabled
Defined in
packages/base-driver/build/lib/basedriver/core.d.ts:51
releaseActions
• releaseActions: () => Promise
<void
> = general.releaseActions
Type declaration
▸ (): Promise
<void
>
Returns
Promise
<void
>
Defined in
packages/fake-driver/lib/driver.js:276
resetOnUnexpectedShutdown
• resetOnUnexpectedShutdown: undefined
| () => void
Inherited from
BaseDriver.resetOnUnexpectedShutdown
Defined in
packages/base-driver/build/lib/basedriver/driver.d.ts:69
server
• server: undefined
| AppiumServer
Inherited from
Defined in
packages/base-driver/build/lib/basedriver/driver.d.ts:64
serverHost
• serverHost: undefined
| string
Inherited from
Defined in
packages/base-driver/build/lib/basedriver/driver.d.ts:65
serverPath
• serverPath: undefined
| string
Inherited from
Defined in
packages/base-driver/build/lib/basedriver/driver.d.ts:67
serverPort
• serverPort: undefined
| number
Inherited from
Defined in
packages/base-driver/build/lib/basedriver/driver.d.ts:66
sessionId
• sessionId: null
| string
Inherited from
Defined in
packages/base-driver/build/lib/basedriver/core.d.ts:32
setAlertText
• setAlertText: (text
: string
) => Promise
<void
> = alert.setAlertText
Type declaration
▸ (text
): Promise
<void
>
Set the text of an alert
Parameters
Name | Type |
---|---|
text |
string |
Returns
Promise
<void
>
Defined in
packages/fake-driver/lib/driver.js:211
setContext
• setContext: (context
: string
) => Promise
<void
> = contexts.setContext
Type declaration
▸ (context
): Promise
<void
>
Set the current context
Parameters
Name | Type | Description |
---|---|---|
context |
string |
name of the context |
Returns
Promise
<void
>
Defined in
packages/fake-driver/lib/driver.js:222
setFrame
• setFrame: (frameId
: number
) => Promise
<void
> = contexts.setFrame
Type declaration
▸ (frameId
): Promise
<void
>
Set the active frame
Parameters
Name | Type |
---|---|
frameId |
number |
Returns
Promise
<void
>
Defined in
packages/fake-driver/lib/driver.js:223
setGeoLocation
• setGeoLocation: (location
: any
) => Promise
<void
> = general.setGeoLocation
Type declaration
▸ (location
): Promise
<void
>
Parameters
Name | Type |
---|---|
location |
any |
Returns
Promise
<void
>
Defined in
packages/fake-driver/lib/driver.js:262
setOrientation
• setOrientation: (o
: any
) => Promise
<void
> = general.setOrientation
Type declaration
▸ (o
): Promise
<void
>
Parameters
Name | Type |
---|---|
o |
any |
Returns
Promise
<void
>
Defined in
packages/fake-driver/lib/driver.js:266
setValue
• setValue: (keys
: any
, elementId
: any
) => Promise
<void
> = element.setValue
Type declaration
▸ (keys
, elementId
): Promise
<void
>
Parameters
Name | Type |
---|---|
keys |
any |
elementId |
any |
Returns
Promise
<void
>
Defined in
packages/fake-driver/lib/driver.js:234
settings
• settings: DeviceSettings
<any
>
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
Defined in
packages/base-driver/build/lib/basedriver/core.d.ts:92
shook
• shook: boolean
Defined in
packages/fake-driver/lib/driver.js:41
shouldValidateCaps
• shouldValidateCaps: boolean
Inherited from
Defined in
packages/base-driver/build/lib/basedriver/core.d.ts:81
shutdownUnexpectedly
• Protected
shutdownUnexpectedly: boolean
Inherited from
BaseDriver.shutdownUnexpectedly
Defined in
packages/base-driver/build/lib/basedriver/core.d.ts:77
supportedLogTypes
• supportedLogTypes: Readonly
<LogDefRecord
<any
>>
Definition of the available log types
Inherited from
Defined in
packages/types/build/lib/driver.d.ts:261
title
• title: () => Promise
<any
> = general.title
Type declaration
▸ (): Promise
<any
>
GENERAL *
Returns
Promise
<any
>
Defined in
packages/fake-driver/lib/driver.js:260
updateSettings
• updateSettings: (settings
: StringRecord
) => Promise
<void
>
Type declaration
▸ (settings
): Promise
<void
>
Update the session's settings dictionary with a new settings object
Parameters
Name | Type | Description |
---|---|---|
settings |
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
Defined in
packages/types/build/lib/driver.d.ts:303
webLocatorStrategies
• webLocatorStrategies: string
[]
Inherited from
BaseDriver.webLocatorStrategies
Defined in
packages/base-driver/build/lib/basedriver/core.d.ts:61
wrapNewEl
• wrapNewEl: (obj
: any
) => { ELEMENT
: string
= existingElId } = find.wrapNewEl
Type declaration
▸ (obj
): Object
Parameters
Name | Type |
---|---|
obj |
any |
Returns
Object
Name | Type |
---|---|
ELEMENT |
string |
Defined in
packages/fake-driver/lib/driver.js:250
baseVersion
▪ Static
baseVersion: string
Inherited from
Defined in
packages/types/build/lib/driver.d.ts:1831
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" ] |
- |
Overrides
Defined in
packages/fake-driver/lib/driver.js:173
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" |
Overrides
Defined in
packages/fake-driver/lib/driver.js:153
Accessors
_desiredCapConstraints
• Protected
get
_desiredCapConstraints(): Readonly
<typeof BASE_DESIRED_CAP_CONSTRAINTS
& 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
<typeof BASE_DESIRED_CAP_CONSTRAINTS
& C
>
Inherited from
BaseDriver._desiredCapConstraints
Defined in
packages/base-driver/build/lib/basedriver/driver.d.ts:43
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
Driver properties mapping
Name | Type |
---|---|
isUnique |
boolean |
Overrides
BaseDriver.driverData
Defined in
packages/fake-driver/lib/driver.js:101
eventHistory
• get
eventHistory(): EventHistory
Returns
Inherited from
BaseDriver.eventHistory
Defined in
packages/base-driver/build/lib/basedriver/core.d.ts:125
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:124
log
• get
log(): AppiumLogger
Returns
Inherited from
BaseDriver.log
Defined in
packages/base-driver/build/lib/basedriver/core.d.ts:93
Methods
addManagedDriver
▸ addManagedDriver(driver
): void
Parameters
Name | Type |
---|---|
driver |
Driver <typeof BASE_DESIRED_CAP_CONSTRAINTS , StringRecord , any > |
Returns
void
Inherited from
Defined in
packages/base-driver/build/lib/basedriver/core.d.ts:220
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:177
assignServer
▸ assignServer(server
, host
, port
, path
): void
Parameters
Name | Type |
---|---|
server |
AppiumServer |
host |
string |
port |
number |
path |
string |
Returns
void
Inherited from
Defined in
packages/base-driver/build/lib/basedriver/driver.d.ts:63
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:149
canProxy
▸ canProxy(): boolean
Returns
boolean
Overrides
Defined in
packages/fake-driver/lib/driver.js:48
clearNewCommandTimeout
▸ clearNewCommandTimeout(): Promise
<void
>
Returns
Promise
<void
>
Inherited from
BaseDriver.clearNewCommandTimeout
Defined in
packages/base-driver/build/lib/basedriver/core.d.ts:222
createSession
▸ createSession(w3cCapabilities1
, w3cCapabilities2?
, w3cCapabilities3?
, driverData?
): Promise
<[string
, Partial
<ConstraintsToCaps
<typeof BASE_DESIRED_CAP_CONSTRAINTS
& { app
: { isString
: true
= true; presence
: true
= true } ; uniqueApp
: { isBoolean
: true
= true } }> & void
>]>
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
, Partial
<ConstraintsToCaps
<typeof BASE_DESIRED_CAP_CONSTRAINTS
& { app
: { isString
: true
= true; presence
: true
= true } ; uniqueApp
: { isBoolean
: true
= true } }> & void
>]>
Session ID and normalized capabilities
Overrides
Defined in
packages/fake-driver/lib/driver.js:78
deleteSession
▸ deleteSession(sessionId?
, driverData?
): Promise
<void
>
Parameters
Name | Type |
---|---|
sessionId? |
string |
driverData? |
DriverData [] |
Returns
Promise
<void
>
Inherited from
Defined in
packages/base-driver/build/lib/basedriver/driver.d.ts:89
driverForSession
▸ driverForSession(sessionId
): null
| Core
<any
>
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
<any
>
Inherited from
Defined in
packages/base-driver/build/lib/basedriver/core.d.ts:149
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:170
executeCommand
▸ executeCommand(cmd
, ...args
): Promise
<any
>
Parameters
Name | Type |
---|---|
cmd |
string |
...args |
any [] |
Returns
Promise
<any
>
Inherited from
Defined in
packages/base-driver/build/lib/basedriver/driver.d.ts:49
executeMethod
▸ executeMethod(script
, args
): Promise
<any
>
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.
Parameters
Name | Type | Description |
---|---|---|
script |
string |
the name of the Execute Method |
args |
[] | [StringRecord ] |
a singleton array containing an arguments object |
Returns
Promise
<any
>
The result of calling the Execute Method
Inherited from
Defined in
packages/types/build/lib/driver.d.ts:149
findElOrElsWithProcessing
▸ findElOrElsWithProcessing<Mult
>(strategy
, selector
, mult
, context?
): Promise
<Mult
extends true
? Element
[] : Element
>
This is a wrapper for IFindCommands.findElOrEls that validates locator strategies
and implements the appium:printPageSourceOnFindFailure
capability
Type parameters
Name | Type |
---|---|
Mult |
extends boolean |
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? |
any |
the element to use as the search context basis if desiredCapabilities |
Returns
Promise
<Mult
extends true
? Element
[] : Element
>
A single element or list of elements
Inherited from
BaseDriver.findElOrElsWithProcessing
Defined in
packages/types/build/lib/driver.d.ts:248
findElementFromShadowRoot
▸ Optional
findElementFromShadowRoot(strategy
, selector
, shadowId
): Promise
<Element
>
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
>
The element inside the shadow root matching the selector
Inherited from
BaseDriver.findElementFromShadowRoot
Defined in
packages/types/build/lib/driver.d.ts:215
findElementsFromShadowRoot
▸ Optional
findElementsFromShadowRoot(strategy
, selector
, shadowId
): Promise
<Element
[]>
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
[]>
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:225
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:139
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:129
getFakeThing
▸ getFakeThing(): Promise
<any
>
Returns
Promise
<any
>
Defined in
packages/fake-driver/lib/driver.js:107
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
Defined in
packages/types/build/lib/driver.d.ts:123
getLogTypes
▸ getLogTypes(): Promise
<string
[]>
Get available log types as a list of strings
Returns
Promise
<string
[]>
Inherited from
Defined in
packages/types/build/lib/driver.d.ts:265
getManagedDrivers
▸ getManagedDrivers(): Driver
<typeof BASE_DESIRED_CAP_CONSTRAINTS
, StringRecord
, any
>[]
Returns
Driver
<typeof BASE_DESIRED_CAP_CONSTRAINTS
, StringRecord
, any
>[]
Inherited from
Defined in
packages/base-driver/build/lib/basedriver/core.d.ts:221
getProxyAvoidList
▸ getProxyAvoidList(sessionId
): RouteMatcher
[]
Parameters
Name | Type |
---|---|
sessionId |
string |
Returns
Inherited from
Defined in
packages/base-driver/build/lib/basedriver/core.d.ts:195
getSession
▸ getSession(): Promise
<SingularSessionData
<typeof BASE_DESIRED_CAP_CONSTRAINTS
, void
>>
Get the data for the current session
Returns
Promise
<SingularSessionData
<typeof BASE_DESIRED_CAP_CONSTRAINTS
, void
>>
A session data object
Inherited from
Defined in
packages/types/build/lib/driver.d.ts:137
getSessions
▸ getSessions(): Promise
<MultiSessionData
<typeof BASE_DESIRED_CAP_CONSTRAINTS
, void
>[]>
Get data for all sessions running on an Appium server
Returns
Promise
<MultiSessionData
<typeof BASE_DESIRED_CAP_CONSTRAINTS
, void
>[]>
A list of session data objects
Inherited from
Defined in
packages/types/build/lib/driver.d.ts:131
getSettings
▸ getSettings(): Promise
<StringRecord
>
Get the current settings for the session
Returns
Promise
<StringRecord
>
The settings object
Inherited from
Defined in
packages/types/build/lib/driver.d.ts:309
getStatus
▸ getStatus(): Promise
<{}>
Returns
Promise
<{}>
Inherited from
Defined in
packages/base-driver/build/lib/basedriver/core.d.ts:135
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
Defined in
packages/types/build/lib/driver.d.ts:53
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
Defined in
packages/types/build/lib/driver.d.ts:32
implicitWaitForCondition
▸ implicitWaitForCondition(condition
): Promise
<unknown
>
Periodically retry an async function up until the currently set implicit wait timeout
Parameters
Name | Type | Description |
---|---|---|
condition |
() => 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:46
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:66
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
Defined in
packages/types/build/lib/driver.d.ts:59
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
Defined in
packages/base-driver/build/lib/basedriver/core.d.ts:162
isMjsonwpProtocol
▸ isMjsonwpProtocol(): boolean
Returns
boolean
Inherited from
Defined in
packages/base-driver/build/lib/basedriver/core.d.ts:150
isW3CProtocol
▸ isW3CProtocol(): boolean
Returns
boolean
Inherited from
Defined in
packages/base-driver/build/lib/basedriver/core.d.ts:151
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
Defined in
packages/types/build/lib/driver.d.ts:115
logEvent
▸ logEvent(eventName
): void
API method for driver developers to log timings for important events
Parameters
Name | Type |
---|---|
eventName |
string |
Returns
void
Inherited from
Defined in
packages/base-driver/build/lib/basedriver/core.d.ts:130
logExtraCaps
▸ logExtraCaps(caps
): void
Parameters
Name | Type |
---|---|
caps |
Partial <ConstraintsToCaps <any > & void > |
Returns
void
Inherited from
Defined in
packages/base-driver/build/lib/basedriver/driver.d.ts:94
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
Defined in
packages/types/build/lib/driver.d.ts:98
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:103
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:79
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
Defined in
packages/types/build/lib/driver.d.ts:72
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:106
proxyActive
▸ proxyActive(): boolean
Returns
boolean
Overrides
Defined in
packages/fake-driver/lib/driver.js:44
proxyCommand
▸ proxyCommand<T
>(): Promise
<T
>
Type parameters
Name | Type |
---|---|
T |
any |
Returns
Promise
<T
>
Defined in
packages/fake-driver/lib/driver.js:65
proxyReqRes
▸ proxyReqRes(req
, res
): void
Parameters
Name | Type |
---|---|
req |
any |
res |
any |
Returns
void
Defined in
packages/fake-driver/lib/driver.js:52
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:215
reset
▸ reset(): Promise
<void
>
Returns
Promise
<void
>
Inherited from
Defined in
packages/base-driver/build/lib/basedriver/driver.d.ts:68
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:92
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
Defined in
packages/types/build/lib/driver.d.ts:85
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
Defined in
packages/base-driver/build/lib/basedriver/core.d.ts:142
setFakeThing
▸ setFakeThing(thing
): Promise
<null
>
Set the 'thing' value (so that it can be retrieved later)
Parameters
Name | Type |
---|---|
thing |
any |
Returns
Promise
<null
>
Defined in
packages/fake-driver/lib/driver.js:118
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
Defined in
packages/types/build/lib/driver.d.ts:38
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:24
setProtocolMJSONWP
▸ setProtocolMJSONWP(): void
Returns
void
Inherited from
Defined in
packages/base-driver/build/lib/basedriver/core.d.ts:152
setProtocolW3C
▸ setProtocolW3C(): void
Returns
void
Inherited from
Defined in
packages/base-driver/build/lib/basedriver/core.d.ts:154
startNewCommandTimeout
▸ startNewCommandTimeout(): Promise
<void
>
Returns
Promise
<void
>
Inherited from
BaseDriver.startNewCommandTimeout
Defined in
packages/base-driver/build/lib/basedriver/driver.d.ts:55
startUnexpectedShutdown
▸ startUnexpectedShutdown(err?
): Promise
<void
>
Parameters
Name | Type |
---|---|
err? |
Error | NoSuchDriverError |
Returns
Promise
<void
>
Inherited from
BaseDriver.startUnexpectedShutdown
Defined in
packages/base-driver/build/lib/basedriver/driver.d.ts:54
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
Defined in
packages/types/build/lib/driver.d.ts:18
validateDesiredCaps
▸ validateDesiredCaps(caps
): boolean
Parameters
Name | Type |
---|---|
caps |
Partial <ConstraintsToCaps <any > & void > |
Returns
boolean
Inherited from
BaseDriver.validateDesiredCaps
Defined in
packages/base-driver/build/lib/basedriver/driver.d.ts:100
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:183
fakeRoute
▸ Static
fakeRoute(req
, res
): void
Parameters
Name | Type |
---|---|
req |
any |
res |
any |
Returns
void
Defined in
packages/fake-driver/lib/driver.js:193
updateServer
▸ Static
updateServer(expressApp
, httpServer
, cliArgs
): Promise
<void
>
Parameters
Name | Type |
---|---|
expressApp |
any |
httpServer |
any |
cliArgs |
any |
Returns
Promise
<void
>
Overrides
BaseDriver.updateServer