Interface: Driver<C, CArgs, Settings, CreateResult, DeleteResult, SessionData>
@appium/types.Driver
BaseDriver
implements this. It contains default behavior;
external drivers are expected to implement ExternalDriver
instead.
C
should be the constraints of the driver.
CArgs
would be the shape of cliArgs
.
Settings
is the shape of the raw device settings object (see IDeviceSettings
)
Type parameters
Name | Type |
---|---|
C |
extends Constraints = Constraints |
CArgs |
extends StringRecord = StringRecord |
Settings |
extends StringRecord = StringRecord |
CreateResult |
DefaultCreateSessionResult <C > |
DeleteResult |
DefaultDeleteSessionResult |
SessionData |
extends StringRecord = StringRecord |
Hierarchy
-
ISettingsCommands
<Settings
> -
ISessionHandler
<C
,CreateResult
,DeleteResult
,SessionData
> -
Core
<C
,Settings
>
↳ Driver
Table of contents
Properties
- allowInsecure
- basePath
- caps
- cliArgs
- denyInsecure
- desiredCapConstraints
- driverData
- eventEmitter
- eventHistory
- helpers
- implicitWaitMs
- initialOpts
- isCommandsQueueEnabled
- locatorStrategies
- log
- newCommandTimeoutMs
- opts
- originalCaps
- protocol
- relaxedSecurityEnabled
- server
- serverHost
- serverPath
- serverPort
- sessionId
- settings
- shouldValidateCaps
- supportedLogTypes
- updateSettings
- webLocatorStrategies
Methods
- addManagedDriver
- assertFeatureEnabled
- assignServer
- canProxy
- clearNewCommandTimeout
- createSession
- deleteSession
- driverForSession
- executeCommand
- executeMethod
- findElOrEls
- findElOrElsWithProcessing
- findElement
- findElementFromElement
- findElementFromShadowRoot
- findElements
- findElementsFromElement
- findElementsFromShadowRoot
- getLog
- getLogEvents
- getLogTypes
- getManagedDrivers
- getPageSource
- getProxyAvoidList
- getSession
- getSessions
- getSettings
- getStatus
- getTimeouts
- implicitWait
- implicitWaitForCondition
- implicitWaitMJSONWP
- implicitWaitW3C
- isFeatureEnabled
- isMjsonwpProtocol
- isW3CProtocol
- logCustomEvent
- logEvent
- logExtraCaps
- newCommandTimeout
- onUnexpectedShutdown
- pageLoadTimeoutMJSONWP
- pageLoadTimeoutW3C
- parseTimeoutArgument
- proxyActive
- proxyRouteIsAvoided
- reset
- scriptTimeoutMJSONWP
- scriptTimeoutW3C
- sessionExists
- setImplicitWait
- setNewCommandTimeout
- startNewCommandTimeout
- startUnexpectedShutdown
- timeouts
- validateDesiredCaps
- validateLocatorStrategy
Properties
allowInsecure
• allowInsecure: string
[]
Inherited from
Defined in
appium/packages/types/lib/driver.ts:612
basePath
• basePath: string
Inherited from
Defined in
appium/packages/types/lib/driver.ts:610
caps
• Optional
caps: ConstraintsToCaps
<C
>
The processed capabilities used to start the session represented by the current driver instance
Defined in
appium/packages/types/lib/driver.ts:744
cliArgs
• cliArgs: CArgs
The set of command line arguments set for this driver
Defined in
appium/packages/types/lib/driver.ts:700
denyInsecure
• denyInsecure: string
[]
Inherited from
Defined in
appium/packages/types/lib/driver.ts:613
desiredCapConstraints
• desiredCapConstraints: C
The constraints object used to validate capabilities
Defined in
appium/packages/types/lib/driver.ts:754
driverData
• driverData: DriverData
Inherited from
Defined in
appium/packages/types/lib/driver.ts:621
eventEmitter
• eventEmitter: EventEmitter
Inherited from
Defined in
appium/packages/types/lib/driver.ts:618
eventHistory
• eventHistory: EventHistory
Inherited from
Defined in
appium/packages/types/lib/driver.ts:623
helpers
• helpers: DriverHelpers
Inherited from
Defined in
appium/packages/types/lib/driver.ts:609
implicitWaitMs
• implicitWaitMs: number
Inherited from
Defined in
appium/packages/types/lib/driver.ts:615
initialOpts
• initialOpts: Partial
<DriverOpts
<C
>>
Inherited from
Defined in
appium/packages/types/lib/driver.ts:607
isCommandsQueueEnabled
• isCommandsQueueEnabled: boolean
Inherited from
Defined in
appium/packages/types/lib/driver.ts:622
locatorStrategies
• locatorStrategies: string
[]
Inherited from
Defined in
appium/packages/types/lib/driver.ts:616
log
• log: AppiumLogger
Inherited from
Defined in
appium/packages/types/lib/driver.ts:620
newCommandTimeoutMs
• newCommandTimeoutMs: number
Inherited from
Defined in
appium/packages/types/lib/driver.ts:614
opts
• opts: DriverOpts
<C
>
Inherited from
Defined in
appium/packages/types/lib/driver.ts:606
originalCaps
• Optional
originalCaps: W3CCapabilities
<C
>
The original capabilities used to start the session represented by the current driver instance
Defined in
appium/packages/types/lib/driver.ts:749
protocol
• Optional
protocol: string
Inherited from
Defined in
appium/packages/types/lib/driver.ts:608
relaxedSecurityEnabled
• relaxedSecurityEnabled: boolean
Inherited from
Defined in
appium/packages/types/lib/driver.ts:611
server
• Optional
server: AppiumServer
Defined in
appium/packages/types/lib/driver.ts:702
serverHost
• Optional
serverHost: string
Defined in
appium/packages/types/lib/driver.ts:703
serverPath
• Optional
serverPath: string
Defined in
appium/packages/types/lib/driver.ts:705
serverPort
• Optional
serverPort: number
Defined in
appium/packages/types/lib/driver.ts:704
sessionId
• sessionId: null
| string
Inherited from
Defined in
appium/packages/types/lib/driver.ts:605
settings
• settings: IDeviceSettings
<Settings
>
Inherited from
Defined in
appium/packages/types/lib/driver.ts:619
shouldValidateCaps
• shouldValidateCaps: boolean
Inherited from
Defined in
appium/packages/types/lib/driver.ts:604
supportedLogTypes
• supportedLogTypes: Readonly
<LogDefRecord
>
Definition of the available log types
Inherited from
ILogCommands.supportedLogTypes
Defined in
appium/packages/types/lib/driver.ts:332
updateSettings
• updateSettings: (settings
: StringRecord
<any
>) => Promise
<void
>
Type declaration
▸ (settings
): Promise
<void
>
Update the session's settings dictionary with a new settings object
Parameters
Name | Type | Description |
---|---|---|
settings |
StringRecord <any > |
A key-value map of setting names to values. Settings not named in the map will not have their value adjusted. |
Returns
Promise
<void
>
Inherited from
ISettingsCommands.updateSettings
Defined in
appium/packages/types/lib/driver.ts:379
webLocatorStrategies
• webLocatorStrategies: string
[]
Inherited from
Defined in
appium/packages/types/lib/driver.ts:617
Methods
addManagedDriver
▸ addManagedDriver(driver
): void
Parameters
Name | Type |
---|---|
driver |
Driver <Constraints , StringRecord <any >, StringRecord <any >, DefaultCreateSessionResult <Constraints >, void , StringRecord <any >> |
Returns
void
Inherited from
Defined in
appium/packages/types/lib/driver.ts:667
assertFeatureEnabled
▸ assertFeatureEnabled(name
): void
Parameters
Name | Type |
---|---|
name |
string |
Returns
void
Inherited from
Defined in
appium/packages/types/lib/driver.ts:661
assignServer
▸ Optional
assignServer(server
, host
, port
, path
): void
A helper function used to assign server information to the driver instance so the driver knows where the server is Running
Parameters
Name | Type | Description |
---|---|---|
server |
AppiumServer |
the server object |
host |
string |
the server hostname |
port |
number |
the server port |
path |
string |
the server base url |
Returns
void
Defined in
appium/packages/types/lib/driver.ts:785
canProxy
▸ canProxy(sessionId?
): boolean
Parameters
Name | Type |
---|---|
sessionId? |
string |
Returns
boolean
Inherited from
Defined in
appium/packages/types/lib/driver.ts:665
clearNewCommandTimeout
▸ clearNewCommandTimeout(): Promise
<void
>
Returns
Promise
<void
>
Inherited from
Defined in
appium/packages/types/lib/driver.ts:669
createSession
▸ createSession(w3cCaps1
, w3cCaps2?
, w3cCaps3?
, driverData?
): Promise
<CreateResult
>
Start a new automation session
See
https://w3c.github.io/webdriver/#new-session
Parameters
Name | Type | Description |
---|---|---|
w3cCaps1 |
W3CDriverCaps <C > |
the new session capabilities |
w3cCaps2? |
W3CDriverCaps <C > |
another place the new session capabilities could be sent (typically left undefined) |
w3cCaps3? |
W3CDriverCaps <C > |
another place the new session capabilities could be sent (typically left undefined) |
driverData? |
DriverData [] |
a list of DriverData objects representing other sessions running for this driver on the same Appium server. This information can be used to help ensure no conflict of resources |
Returns
Promise
<CreateResult
>
The capabilities object representing the created session
Inherited from
Defined in
appium/packages/types/lib/driver.ts:428
deleteSession
▸ deleteSession(sessionId?
, driverData?
): Promise
<DeleteResult
>
Stop an automation session
See
https://w3c.github.io/webdriver/#delete-session
Parameters
Name | Type | Description |
---|---|---|
sessionId? |
string |
the id of the session that is to be deleted |
driverData? |
DriverData [] |
the driver data for other currently-running sessions |
Returns
Promise
<DeleteResult
>
Inherited from
Defined in
appium/packages/types/lib/driver.ts:442
driverForSession
▸ driverForSession(sessionId
): null
| Core
<C
, StringRecord
<any
>>
Parameters
Name | Type |
---|---|
sessionId |
string |
Returns
null
| Core
<C
, StringRecord
<any
>>
Inherited from
Defined in
appium/packages/types/lib/driver.ts:671
executeCommand
▸ executeCommand(cmd
, ...args
): Promise
<any
>
Execute a driver (WebDriver-protocol) command by its name as defined in the routes file
Parameters
Name | Type | Description |
---|---|---|
cmd |
string |
the name of the command |
...args |
any [] |
arguments to pass to the command |
Returns
Promise
<any
>
The result of running the command
Defined in
appium/packages/types/lib/driver.ts:717
executeMethod
▸ executeMethod<TArgs
, TReturn
>(script
, args
): Promise
<TReturn
>
Call an Execute Method
by its name with the given arguments. This method will check that the
driver has registered the method matching the name, and send it the arguments.
Type parameters
Name | Type |
---|---|
TArgs |
extends readonly any [] | readonly [StringRecord <unknown >] = unknown [] |
TReturn |
unknown |
Parameters
Name | Type | Description |
---|---|---|
script |
string |
the name of the Execute Method |
args |
TArgs |
a singleton array containing an arguments object |
Returns
Promise
<TReturn
>
The result of calling the Execute Method
Inherited from
IExecuteCommands.executeMethod
Defined in
appium/packages/types/lib/driver.ts:170
findElOrEls
▸ findElOrEls<Mult
, Ctx
>(strategy
, selector
, mult
, context?
): Promise
<Mult
extends true
? Element
<string
>[] : Element
<string
>>
A helper method that returns one or more UI elements based on the search criteria
Type parameters
Name | Type |
---|---|
Mult |
extends boolean |
Ctx |
any |
Parameters
Name | Type | Description |
---|---|---|
strategy |
string |
the locator strategy |
selector |
string |
the selector |
mult |
Mult |
whether or not we want to find multiple elements |
context? |
Ctx |
the element to use as the search context basis if desiredCapabilities |
Returns
Promise
<Mult
extends true
? Element
<string
>[] : Element
<string
>>
A single element or list of elements
Inherited from
Defined in
appium/packages/types/lib/driver.ts:294
findElOrElsWithProcessing
▸ findElOrElsWithProcessing<Mult
, Ctx
>(strategy
, selector
, mult
, context?
): Promise
<Mult
extends true
? Element
<string
>[] : Element
<string
>>
This is a wrapper for findElOrEls
that validates locator strategies
and implements the appium:printPageSourceOnFindFailure
capability
Type parameters
Name | Type |
---|---|
Mult |
extends boolean |
Ctx |
any |
Parameters
Name | Type | Description |
---|---|---|
strategy |
string |
the locator strategy |
selector |
string |
the selector |
mult |
Mult |
whether or not we want to find multiple elements |
context? |
Ctx |
the element to use as the search context basis if desiredCapabilities |
Returns
Promise
<Mult
extends true
? Element
<string
>[] : Element
<string
>>
A single element or list of elements
Inherited from
IFindCommands.findElOrElsWithProcessing
Defined in
appium/packages/types/lib/driver.ts:312
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
Defined in
appium/packages/types/lib/driver.ts:210
findElementFromElement
▸ findElementFromElement(strategy
, selector
, elementId
): Promise
<Element
<string
>>
Find a UI element given a locator strategy and a selector, erroring if it can't be found. Only look for elements among the set of descendants of a given element
See
https://w3c.github.io/webdriver/#find-element-from-element
Parameters
Name | Type | Description |
---|---|---|
strategy |
string |
the locator strategy |
selector |
string |
the selector to combine with the strategy to find the specific element |
elementId |
string |
the id of the element to use as the search basis |
Returns
Promise
<Element
<string
>>
The element object encoding the element id which can be used in element-related commands
Inherited from
IFindCommands.findElementFromElement
Defined in
appium/packages/types/lib/driver.ts:235
findElementFromShadowRoot
▸ Optional
findElementFromShadowRoot(strategy
, selector
, shadowId
): Promise
<Element
<string
>>
Find an element from a shadow root
See
https://w3c.github.io/webdriver/#find-element-from-shadow-root
Parameters
Name | Type | Description |
---|---|---|
strategy |
string |
the locator strategy |
selector |
string |
the selector to combine with the strategy to find the specific elements |
shadowId |
string |
the id of the element to use as the search basis |
Returns
Promise
<Element
<string
>>
The element inside the shadow root matching the selector
Inherited from
IFindCommands.findElementFromShadowRoot
Defined in
appium/packages/types/lib/driver.ts:263
findElements
▸ findElements(strategy
, selector
): Promise
<Element
<string
>[]>
Find a a list of all UI elements matching a given a locator strategy and a selector
See
https://w3c.github.io/webdriver/#find-elements
Parameters
Name | Type | Description |
---|---|---|
strategy |
string |
the locator strategy |
selector |
string |
the selector to combine with the strategy to find the specific elements |
Returns
Promise
<Element
<string
>[]>
A possibly-empty list of element objects
Inherited from
Defined in
appium/packages/types/lib/driver.ts:221
findElementsFromElement
▸ findElementsFromElement(strategy
, selector
, elementId
): Promise
<Element
<string
>[]>
Find a a list of all UI elements matching a given a locator strategy and a selector. Only look for elements among the set of descendants of a given element
See
https://w3c.github.io/webdriver/#find-elements-from-element
Parameters
Name | Type | Description |
---|---|---|
strategy |
string |
the locator strategy |
selector |
string |
the selector to combine with the strategy to find the specific elements |
elementId |
string |
the id of the element to use as the search basis |
Returns
Promise
<Element
<string
>[]>
A possibly-empty list of element objects
Inherited from
IFindCommands.findElementsFromElement
Defined in
appium/packages/types/lib/driver.ts:248
findElementsFromShadowRoot
▸ Optional
findElementsFromShadowRoot(strategy
, selector
, shadowId
): Promise
<Element
<string
>[]>
Find elements from a shadow root
See
https://w3c.github.io/webdriver/#find-element-from-shadow-root
Parameters
Name | Type | Description |
---|---|---|
strategy |
string |
the locator strategy |
selector |
string |
the selector to combine with the strategy to find the specific elements |
shadowId |
string |
the id of the element to use as the search basis |
Returns
Promise
<Element
<string
>[]>
A possibly empty list of elements inside the shadow root matching the selector
Inherited from
IFindCommands.findElementsFromShadowRoot
Defined in
appium/packages/types/lib/driver.ts:278
getLog
▸ getLog(logType
): Promise
<unknown
[]>
Get the log for a given log type.
Parameters
Name | Type | Description |
---|---|---|
logType |
string |
Name/key of log type as defined in supportedLogTypes . |
Returns
Promise
<unknown
[]>
Inherited from
Defined in
appium/packages/types/lib/driver.ts:344
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
appium/packages/types/lib/driver.ts:157
getLogTypes
▸ getLogTypes(): Promise
<string
[]>
Get available log types as a list of strings
Returns
Promise
<string
[]>
Inherited from
Defined in
appium/packages/types/lib/driver.ts:337
getManagedDrivers
▸ getManagedDrivers(): Driver
<Constraints
, StringRecord
<any
>, StringRecord
<any
>, DefaultCreateSessionResult
<Constraints
>, void
, StringRecord
<any
>>[]
Returns
Driver
<Constraints
, StringRecord
<any
>, StringRecord
<any
>, DefaultCreateSessionResult
<Constraints
>, void
, StringRecord
<any
>>[]
Inherited from
Defined in
appium/packages/types/lib/driver.ts:668
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
Defined in
appium/packages/types/lib/driver.ts:325
getProxyAvoidList
▸ getProxyAvoidList(sessionId?
): RouteMatcher
[]
Parameters
Name | Type |
---|---|
sessionId? |
string |
Returns
Inherited from
Defined in
appium/packages/types/lib/driver.ts:664
getSession
▸ getSession(): Promise
<SingularSessionData
<C
, SessionData
>>
Get the data for the current session
Returns
Promise
<SingularSessionData
<C
, SessionData
>>
A session data object
Inherited from
Defined in
appium/packages/types/lib/driver.ts:456
getSessions
▸ getSessions(): Promise
<MultiSessionData
<Constraints
>[]>
Get data for all sessions running on an Appium server
Returns
Promise
<MultiSessionData
<Constraints
>[]>
A list of session data objects
Inherited from
Defined in
appium/packages/types/lib/driver.ts:449
getSettings
▸ getSettings(): Promise
<Settings
>
Get the current settings for the session
Returns
Promise
<Settings
>
The settings object
Inherited from
Defined in
appium/packages/types/lib/driver.ts:386
getStatus
▸ getStatus(): Promise
<any
>
Summary
Retrieve the server's current status.
Description
Returns information about whether a remote end is in a state in which it can create new sessions and can additionally include arbitrary meta information that is specific to the implementation.
The readiness state is represented by the ready property of the body, which is false if an attempt to create a session at the current time would fail. However, the value true does not guarantee that a New Session command will succeed.
Implementations may optionally include additional meta information as part of the body, but the top-level properties ready and message are reserved and must not be overwritten.
Example
Returns
Promise
<any
>
Inherited from
Defined in
appium/packages/types/lib/driver.ts:656
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
appium/packages/types/lib/driver.ts:77
implicitWait
▸ implicitWait(ms
): Promise
<void
>
Set the implicit wait timeout
Deprecated
Use timeouts
instead
Parameters
Name | Type | Description |
---|---|---|
ms |
string | number |
the timeout in ms |
Returns
Promise
<void
>
Inherited from
Defined in
appium/packages/types/lib/driver.ts:53
implicitWaitForCondition
▸ implicitWaitForCondition(condition
): Promise
<unknown
>
Periodically retry an async function up until the currently set implicit wait timeout
Parameters
Name | Type | Description |
---|---|---|
condition |
(...args : any []) => Promise <any > |
the behaviour to retry until it returns truthy |
Returns
Promise
<unknown
>
The return value of the condition
Inherited from
ITimeoutCommands.implicitWaitForCondition
Defined in
appium/packages/types/lib/driver.ts:69
implicitWaitMJSONWP
▸ implicitWaitMJSONWP(ms
): Promise
<void
>
Set the implicit wait value that was sent in via the JSONWP
Deprecated
Parameters
Name | Type | Description |
---|---|---|
ms |
number |
the timeout in ms |
Returns
Promise
<void
>
Inherited from
ITimeoutCommands.implicitWaitMJSONWP
Defined in
appium/packages/types/lib/driver.ts:92
implicitWaitW3C
▸ implicitWaitW3C(ms
): Promise
<void
>
Set the implicit wait value that was sent in via the W3C protocol
Parameters
Name | Type | Description |
---|---|---|
ms |
number |
the timeout in ms |
Returns
Promise
<void
>
Inherited from
ITimeoutCommands.implicitWaitW3C
Defined in
appium/packages/types/lib/driver.ts:84
isFeatureEnabled
▸ isFeatureEnabled(name
): boolean
Parameters
Name | Type |
---|---|
name |
string |
Returns
boolean
Inherited from
Defined in
appium/packages/types/lib/driver.ts:660
isMjsonwpProtocol
▸ isMjsonwpProtocol(): boolean
Returns
boolean
Inherited from
Defined in
appium/packages/types/lib/driver.ts:659
isW3CProtocol
▸ isW3CProtocol(): boolean
Returns
boolean
Inherited from
Defined in
appium/packages/types/lib/driver.ts:658
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
appium/packages/types/lib/driver.ts:148
logEvent
▸ logEvent(eventName
): void
Parameters
Name | Type |
---|---|
eventName |
string |
Returns
void
Inherited from
Defined in
appium/packages/types/lib/driver.ts:670
logExtraCaps
▸ logExtraCaps(caps
): void
A helper function to log unrecognized capabilities to the console
Params
caps - the capabilities
Parameters
Name | Type |
---|---|
caps |
DriverCaps <C > |
Returns
void
Defined in
appium/packages/types/lib/driver.ts:774
newCommandTimeout
▸ newCommandTimeout(ms
): Promise
<void
>
Set Appium's new command timeout
Parameters
Name | Type | Description |
---|---|---|
ms |
number |
the timeout in ms |
Returns
Promise
<void
>
Inherited from
ITimeoutCommands.newCommandTimeout
Defined in
appium/packages/types/lib/driver.ts:129
onUnexpectedShutdown
▸ onUnexpectedShutdown(handler
): void
Parameters
Name | Type |
---|---|
handler |
() => any |
Returns
void
Inherited from
Defined in
appium/packages/types/lib/driver.ts:624
pageLoadTimeoutMJSONWP
▸ pageLoadTimeoutMJSONWP(ms
): Promise
<void
>
Set the page load timeout value that was sent in via the JSONWP
Deprecated
Parameters
Name | Type | Description |
---|---|---|
ms |
number |
the timeout in ms |
Returns
Promise
<void
>
Inherited from
ITimeoutCommands.pageLoadTimeoutMJSONWP
Defined in
appium/packages/types/lib/driver.ts:107
pageLoadTimeoutW3C
▸ pageLoadTimeoutW3C(ms
): Promise
<void
>
Set the page load timeout value that was sent in via the W3C protocol
Parameters
Name | Type | Description |
---|---|---|
ms |
number |
the timeout in ms |
Returns
Promise
<void
>
Inherited from
ITimeoutCommands.pageLoadTimeoutW3C
Defined in
appium/packages/types/lib/driver.ts:99
parseTimeoutArgument
▸ parseTimeoutArgument(ms
): number
Get a timeout value from a number or a string
Parameters
Name | Type | Description |
---|---|---|
ms |
string | number |
the timeout value as a number or a string |
Returns
number
The timeout as a number in ms
Inherited from
ITimeoutCommands.parseTimeoutArgument
Defined in
appium/packages/types/lib/driver.ts:138
proxyActive
▸ proxyActive(sessionId?
): boolean
Parameters
Name | Type |
---|---|
sessionId? |
string |
Returns
boolean
Inherited from
Defined in
appium/packages/types/lib/driver.ts:663
proxyRouteIsAvoided
▸ proxyRouteIsAvoided(sessionId
, method
, url
): boolean
Parameters
Name | Type |
---|---|
sessionId |
string |
method |
string |
url |
string |
Returns
boolean
Inherited from
Defined in
appium/packages/types/lib/driver.ts:666
reset
▸ reset(): Promise
<void
>
Reset the current session (run the delete session and create session subroutines)
Deprecated
Use explicit session management commands instead
Returns
Promise
<void
>
Defined in
appium/packages/types/lib/driver.ts:739
scriptTimeoutMJSONWP
▸ scriptTimeoutMJSONWP(ms
): Promise
<void
>
Set the script timeout value that was sent in via the JSONWP
Deprecated
Parameters
Name | Type | Description |
---|---|---|
ms |
number |
the timeout in ms |
Returns
Promise
<void
>
Inherited from
ITimeoutCommands.scriptTimeoutMJSONWP
Defined in
appium/packages/types/lib/driver.ts:122
scriptTimeoutW3C
▸ scriptTimeoutW3C(ms
): Promise
<void
>
Set the script timeout value that was sent in via the W3C protocol
Parameters
Name | Type | Description |
---|---|---|
ms |
number |
the timeout in ms |
Returns
Promise
<void
>
Inherited from
ITimeoutCommands.scriptTimeoutW3C
Defined in
appium/packages/types/lib/driver.ts:114
sessionExists
▸ sessionExists(sessionId?
): boolean
Parameters
Name | Type |
---|---|
sessionId? |
string |
Returns
boolean
Inherited from
Defined in
appium/packages/types/lib/driver.ts:657
setImplicitWait
▸ setImplicitWait(ms
): void
A helper method (not a command) used to set the implicit wait value
Parameters
Name | Type | Description |
---|---|---|
ms |
number |
the implicit wait in ms |
Returns
void
Inherited from
ITimeoutCommands.setImplicitWait
Defined in
appium/packages/types/lib/driver.ts:60
setNewCommandTimeout
▸ setNewCommandTimeout(ms
): void
Set the new command timeout
Parameters
Name | Type | Description |
---|---|---|
ms |
number |
the timeout in ms |
Returns
void
Inherited from
ITimeoutCommands.setNewCommandTimeout
Defined in
appium/packages/types/lib/driver.ts:43
startNewCommandTimeout
▸ startNewCommandTimeout(): Promise
<void
>
Start the timer for the New Command Timeout, which when it runs out, will stop the current session
Returns
Promise
<void
>
Defined in
appium/packages/types/lib/driver.ts:731
startUnexpectedShutdown
▸ startUnexpectedShutdown(err?
): Promise
<void
>
Signify to any owning processes that this driver encountered an error which should cause the session to terminate immediately (for example an upstream service failed)
Parameters
Name | Type | Description |
---|---|---|
err? |
Error |
the Error object which is causing the shutdown |
Returns
Promise
<void
>
Defined in
appium/packages/types/lib/driver.ts:725
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
appium/packages/types/lib/driver.ts:30
validateDesiredCaps
▸ validateDesiredCaps(caps
): boolean
Validate the capabilities used to start a session
Parameters
Name | Type | Description |
---|---|---|
caps |
DriverCaps <C > |
the capabilities |
Returns
boolean
Whether or not the capabilities are valid
Defined in
appium/packages/types/lib/driver.ts:765
validateLocatorStrategy
▸ validateLocatorStrategy(strategy
, webContext?
): void
Parameters
Name | Type |
---|---|
strategy |
string |
webContext? |
boolean |
Returns
void