Module: @appium/types
Table of contents
Actions
- Key
- ActionSequence
- KeyAction
- KeyActionSequence
- KeyDownAction
- KeyUpAction
- NullAction
- NullActionSequence
- PauseAction
- PointerAction
- PointerActionSequence
- PointerDownAction
- PointerMoveAction
- PointerParameters
- PointerUpAction
Classes
Interfaces
- AppiumConfiguration
- AppiumLogger
- AppiumServerExtension
- AppiumServerSocket
- BaseExecuteMethodDef
- BaseMethodDef
- CachedAppInfo
- ConfigureAppOptions
- Constraint
- Cookie
- Core
- Credential
- DefaultCapabilitiesConfig
- Driver
- DriverConfig
- DriverExecuteMethodDef
- DriverHelpers
- DriverMethodDef
- DriverMethodMap
- DriverStatic
- Element
- EventHistory
- EventHistoryCommand
- ExecuteMethodDef
- ExternalDriver
- ExtraDriverOpts
- IDeviceSettings
- IEventCommands
- IExecuteCommands
- IFindCommands
- ILogCommands
- ISessionHandler
- ISettingsCommands
- ITimeoutCommands
- Location
- LogDef
- LogFilterRegex
- LogFilterText
- MultiSessionData
- NewWindow
- NodeconfigConfig
- PayloadParams
- Plugin
- PluginConfig
- PluginExecuteMethodDef
- PluginMethodDef
- PluginMethodMap
- PluginStatic
- PostProcessOptions
- PostProcessResult
- Rect
- Rotation
- ServerConfig
- StandardCapabilities
- W3CCapabilities
Type Aliases
- AddressConfig
- AddressConfig1
- AddressConfig2
- AllowCorsConfig
- AllowInsecureConfig
- AnyCase
- AppiumConfig
- AppiumLoggerLevel
- AppiumLoggerPrefix
- AppiumServer
- Associated
- BaseCapabilities
- BaseDriverCapConstraints
- BaseNSCapabilities
- BasePathConfig
- BaseW3CCapabilities
- CallbackAddressConfig
- CallbackPortConfig
- Capabilities
- CapsToNSCaps
- Class
- ConstraintChoice
- ConstraintToCap
- ConstraintToCapKind
- Constraints
- ConstraintsToCaps
- DebugLogSpacingConfig
- DefaultCreateSessionResult
- DefaultDeleteSessionResult
- DenyInsecureConfig
- DriverCaps
- DriverClass
- DriverCommand
- DriverCommandToPluginCommand
- DriverData
- DriverOpts
- DriverType
- ExecuteMethodMap
- ExtensionType
- HTTPHeaders
- HTTPMethod
- InitialOpts
- KebabToCamel
- KeepAliveTimeoutConfig
- KeysToCamelCase
- LocalTimezoneConfig
- LogConfig
- LogDefRecord
- LogFilter
- LogFiltersConfig
- LogLevelConfig
- LogNoColorsConfig
- LogTimestampConfig
- LongStacktraceConfig
- MethodMap
- NSCapabilities
- NSDriverCaps
- NamespacedString
- NewWindowType
- NextPluginCallback
- NoPermsCheckConfig
- NormalizedAppiumConfig
- NormalizedServerConfig
- ObjectToCamel
- Orientation
- PluginClass
- PluginCommand
- PluginType
- PortConfig
- Position
- Protocol
- RelaxedSecurityConfig
- RouteMatcher
- ServerArgs
- SessionOverrideConfig
- SettingsUpdateListener
- SingularSessionData
- Size
- StrictCapsConfig
- StringRecord
- TmpConfig
- TraceDirConfig
- UpdateServerCallback
- UseDriversConfig
- UsePluginsConfig
- W3CDriverCaps
- W3C_APPIUM_PREFIX
- WebhookConfig
Variables
Actions
• Key: Object
Defined in
packages/types/lib/action.ts:118
ActionSequence
Ƭ ActionSequence: NullActionSequence
| KeyActionSequence
| PointerActionSequence
Defined in
packages/types/lib/action.ts:113
KeyAction
Ƭ KeyAction: PauseAction
| KeyDownAction
| KeyUpAction
Defined in
packages/types/lib/action.ts:68
KeyActionSequence
Ƭ KeyActionSequence: Object
Type declaration
Name | Type |
---|---|
actions |
KeyAction [] |
id |
string |
type |
"key" |
Defined in
packages/types/lib/action.ts:87
KeyDownAction
Ƭ KeyDownAction: Object
Type declaration
Name | Type |
---|---|
type |
"keyDown" |
value |
Key | string |
Defined in
packages/types/lib/action.ts:20
KeyUpAction
Ƭ KeyUpAction: Object
Type declaration
Name | Type |
---|---|
type |
"keyUp" |
value |
Key | string |
Defined in
packages/types/lib/action.ts:28
NullAction
Ƭ NullAction: PauseAction
Defined in
packages/types/lib/action.ts:63
NullActionSequence
Ƭ NullActionSequence: Object
Type declaration
Name | Type |
---|---|
actions |
NullAction [] |
id |
string |
type |
"none" |
Defined in
packages/types/lib/action.ts:78
PauseAction
Ƭ PauseAction: Object
Type declaration
Name | Type |
---|---|
duration |
number |
type |
"pause" |
Defined in
packages/types/lib/action.ts:12
PointerAction
Ƭ PointerAction: PauseAction
| PointerMoveAction
| PointerUpAction
| PointerDownAction
Defined in
packages/types/lib/action.ts:73
PointerActionSequence
Ƭ PointerActionSequence: Object
Type declaration
Name | Type |
---|---|
actions |
PointerAction [] |
id |
string |
parameters? |
PointerParameters |
type |
"pointer" |
Defined in
packages/types/lib/action.ts:103
PointerDownAction
Ƭ PointerDownAction: Object
Type declaration
Name | Type |
---|---|
button |
number |
type |
"pointerDown" |
Defined in
packages/types/lib/action.ts:55
PointerMoveAction
Ƭ PointerMoveAction: Object
Type declaration
Name | Type |
---|---|
duration? |
number |
origin? |
"viewport" | "pointer" | Element |
type |
"pointerMove" |
x |
number |
y |
number |
Defined in
packages/types/lib/action.ts:36
PointerParameters
Ƭ PointerParameters: Object
Type declaration
Name | Type |
---|---|
pointerType |
"mouse" | "pen" | "touch" |
Defined in
packages/types/lib/action.ts:96
PointerUpAction
Ƭ PointerUpAction: Object
Type declaration
Name | Type |
---|---|
button |
number |
type |
"pointerUp" |
Defined in
packages/types/lib/action.ts:47
Type Aliases
AddressConfig
Ƭ AddressConfig: AddressConfig1
& AddressConfig2
IPv4/IPv6 address or a hostname to listen on
Defined in
packages/types/lib/appium-config.ts:11
AddressConfig1
Ƭ AddressConfig1: string
Defined in
packages/types/lib/appium-config.ts:12
AddressConfig2
Ƭ AddressConfig2: string
Defined in
packages/types/lib/appium-config.ts:13
AllowCorsConfig
Ƭ AllowCorsConfig: boolean
Whether the Appium server should allow web browser connections from any host
Defined in
packages/types/lib/appium-config.ts:17
AllowInsecureConfig
Ƭ AllowInsecureConfig: string
[]
Set which insecure features are allowed to run in this server's sessions. Features are defined on a driver level; see documentation for more details. Note that features defined via "deny-insecure" will be disabled, even if also listed here. If string, a path to a text file containing policy or a comma-delimited list.
Defined in
packages/types/lib/appium-config.ts:21
AnyCase
Ƭ AnyCase<T
>: string
extends T
? string
: T
extends `${infer F1}${infer F2}${infer R}` ? `${Uppercase<F1> | Lowercase<F1>}${Uppercase<F2> | Lowercase<F2>}${AnyCase<R>}` : T
extends `${infer F}${infer R}` ? `${Uppercase<F> | Lowercase<F>}${AnyCase<R>}` : ""
Given string
T
, this is a case-insensitive version of T
.
Type parameters
Name | Type |
---|---|
T |
extends string |
Defined in
AppiumConfig
Ƭ AppiumConfig: Partial
<AppiumConfiguration
>
The Appium configuration as it would be in a user-provided configuration file.
Defined in
packages/types/lib/config.ts:8
AppiumLoggerLevel
Ƭ AppiumLoggerLevel: "silly"
| "verbose"
| "debug"
| "info"
| "http"
| "warn"
| "error"
Possible "log levels" for AppiumLogger
.
Extracted from npmlog
.
Defined in
packages/types/lib/logger.ts:15
AppiumLoggerPrefix
Ƭ AppiumLoggerPrefix: string
| () => string
A log prefix for AppiumLogger
If a function, the function will return the prefix. Log messages will be prefixed with this value.
Defined in
packages/types/lib/logger.ts:8
AppiumServer
Ƭ AppiumServer: Omit
<HTTPServer
, "close"
> & AppiumServerExtension
Appium's slightly-modified HTTPServer http.Server.
Defined in
packages/types/lib/server.ts:10
Associated
Ƭ Associated<A
, B
>: { [Prop in keyof Required<A>]: B[Prop] }
Object B
has all the keys as object A
(even if those keys in A
are otherwise optional).
Type parameters
Name | Type |
---|---|
A |
extends object |
B |
extends |
Defined in
BaseCapabilities
Ƭ BaseCapabilities: Capabilities
<BaseDriverCapConstraints
>
Base capabilities as derived from BaseDriverCapConstraints
.
Defined in
packages/types/lib/capabilities.ts:13
BaseDriverCapConstraints
Ƭ BaseDriverCapConstraints: typeof BASE_DESIRED_CAP_CONSTRAINTS
Defined in
packages/types/lib/constraints.ts:55
BaseNSCapabilities
Ƭ BaseNSCapabilities: NSCapabilities
<BaseDriverCapConstraints
>
Like BaseCapabilities
, except all Appium-specific keys are namespaced.
Defined in
packages/types/lib/capabilities.ts:18
BasePathConfig
Ƭ BasePathConfig: string
Base path to use as the prefix for all webdriver routes running on the server
Defined in
packages/types/lib/appium-config.ts:25
BaseW3CCapabilities
Ƭ BaseW3CCapabilities: W3CCapabilities
<BaseDriverCapConstraints
>
Like NSBaseCapabilities, except W3C-style.
See
Defined in
packages/types/lib/capabilities.ts:24
CallbackAddressConfig
Ƭ CallbackAddressConfig: string
Callback IP address (default: same as "address")
Defined in
packages/types/lib/appium-config.ts:29
CallbackPortConfig
Ƭ CallbackPortConfig: number
Callback port (default: same as "port")
Defined in
packages/types/lib/appium-config.ts:33
Capabilities
Ƭ Capabilities<C
>: ConstraintsToCaps
<C
>
Given some constraints, return the entire set of supported capabilities it supports (including whatever is in its desired caps).
Does not contain BaseCapabilities
; see DriverCaps
.
Type parameters
Name | Type |
---|---|
C |
extends Constraints |
Defined in
packages/types/lib/capabilities.ts:100
CapsToNSCaps
Ƭ CapsToNSCaps<T
, NS
>: { [K in keyof T as K extends keyof StandardCapabilities ? K : NamespacedString<K & string, NS>]: T[K] }
Given StringRecord
T
and namespace string NS
, a type with the key names prefixed by ${NS}:
except for standard capabilities. NS
defaults to appium
.
If T
is already namespaced, well, it'll get double-namespaced.
Type parameters
Name | Type |
---|---|
T |
extends StringRecord |
NS |
extends string = W3C_APPIUM_PREFIX |
Defined in
packages/types/lib/capabilities.ts:72
Class
Ƭ Class<Proto
, StaticMembers
, Args
>: _Class
<Proto
, Args
> & StaticMembers
Wraps _Class type-fest
's Class
to include static members.
Type parameters
Name | Type |
---|---|
Proto |
Proto |
StaticMembers |
extends object = object |
Args |
extends unknown [] = any [] |
Defined in
ConstraintChoice
Ƭ ConstraintChoice<C
, T
>: C
["inclusionCaseInsensitive"
] extends T
[] ? AnyCase
<C
["inclusionCaseInsensitive"
][number
]> : C
["inclusion"
] extends ReadonlyArray
<T
> ? C
["inclusion"
][number
] : T
Given a Constraint
C
and a type T
, see if inclusion
/inclusionCaseInsensitive
is present, and create a union of its allowed literals; otherwise just use T
.
Type parameters
Name | Type |
---|---|
C |
extends Constraint |
T |
T |
Defined in
packages/types/lib/capabilities.ts:29
ConstraintToCap
Ƭ ConstraintToCap<C
>: C
["presence"
] extends true
| { allowEmpty
: boolean
} ? ConstraintToCapKind
<C
> : ConstraintToCapKind
<C
> | undefined
Given Constraint
C
, determine if it is required or optional.
In practice, all capabilities are considered optional per types, but various errors might be thrown if some are not present.
Type parameters
Name | Type |
---|---|
C |
extends Constraint |
Defined in
packages/types/lib/capabilities.ts:61
ConstraintToCapKind
Ƭ ConstraintToCapKind<C
>: C
["isString"
] extends true
? ConstraintChoice
<C
, string
> : C
["isNumber"
] extends true
? ConstraintChoice
<C
, number
> : C
["isBoolean"
] extends true
? boolean
: C
["isArray"
] extends true
? string
[] : C
["isObject"
] extends true
? StringRecord
: unknown
Given Constraint
C
, determine the associated type of the capability.
Notes:
- Only
number
andstring
values can have "choices" (inclusion
/inclusionCaseInesnsitive
) associated with them. - If
isArray
istrue
, the type is always of typestring[]
. If this is incorrect, then it will beany[]
. - There is no way to express the shape of an object if
ifObject
istrue
.
Type parameters
Name | Type |
---|---|
C |
extends Constraint |
Defined in
packages/types/lib/capabilities.ts:44
Constraints
Ƭ Constraints: Object
A collection of constraints describing the allowed capabilities for a driver.
Index signature
▪ [name: string
]: Constraint
Defined in
packages/types/lib/driver.ts:481
ConstraintsToCaps
Ƭ ConstraintsToCaps<C
>: { -readonly [K in keyof C]: ConstraintToCap<C[K]> }
Converts Constraint
C
to a Capabilities
object.
Type parameters
Name | Type |
---|---|
C |
extends Constraints |
Defined in
packages/types/lib/capabilities.ts:91
DebugLogSpacingConfig
Ƭ DebugLogSpacingConfig: boolean
Add exaggerated spacing in logs to help with visual inspection
Defined in
packages/types/lib/appium-config.ts:37
DefaultCreateSessionResult
Ƭ DefaultCreateSessionResult<C
>: [sessionId: string, capabilities: DriverCaps<C>]
See
Type parameters
Name | Type |
---|---|
C |
extends Constraints |
Defined in
packages/types/lib/driver.ts:394
DefaultDeleteSessionResult
Ƭ DefaultDeleteSessionResult: void
See
Defined in
packages/types/lib/driver.ts:402
DenyInsecureConfig
Ƭ DenyInsecureConfig: string
[]
Set which insecure features are not allowed to run in this server's sessions. Features are defined on a driver level; see documentation for more details. Features listed here will not be enabled even if also listed in "allow-insecure", and even if "relaxed-security" is enabled. If string, a path to a text file containing policy or a comma-delimited list.
Defined in
packages/types/lib/appium-config.ts:41
DriverCaps
Ƭ DriverCaps<C
>: BaseCapabilities
& Capabilities
<C
>
Normalized capabilities for drivers extending BaseDriver
.
Includes BaseCapabilities
.
Type parameters
Name | Type |
---|---|
C |
extends Constraints = Constraints |
Defined in
packages/types/lib/capabilities.ts:144
DriverClass
Ƭ DriverClass<T
>: Class
<T
, DriverStatic
<T
>, [] | [Partial
<ServerArgs
>] | [Partial
<ServerArgs
>, boolean
]>
Represents a driver class, which is used internally by Appium.
This is likely unusable by external consumers, but YMMV!
Type parameters
Name | Type |
---|---|
T |
extends Driver = Driver |
Defined in
packages/types/lib/driver.ts:2010
DriverCommand
Ƭ DriverCommand<TArgs
, TRetval
>: (...args
: TArgs
) => Promise
<TRetval
>
Type parameters
Name | Type |
---|---|
TArgs |
extends readonly any [] = any [] |
TRetval |
unknown |
Type declaration
▸ (...args
): Promise
<TRetval
>
An instance method of a driver class, whose name may be referenced by MethodDef.command, and serves as an Appium command.
Note that this signature differs from a PluginCommand
.
Parameters
Name | Type |
---|---|
...args |
TArgs |
Returns
Promise
<TRetval
>
Defined in
packages/types/lib/driver.ts:2035
DriverCommandToPluginCommand
Ƭ DriverCommandToPluginCommand<DC
, TArgs
, TReturn
, NextRetval
>: PluginCommand
<ExternalDriver
, TArgs
, TReturn
, NextRetval
>
This utility type can presently be used by Plugin authors to mark a method in their plugin as one which overrides a method in a Driver.
Example
class MyPlugin extends BasePlugin implements Plugin {
public getPageSource: DriverCommandToPluginCommand<
ExternalDriver['getPageSource'], // method to override
[flag: boolean], // new arguments; defaults to the args of the method
string|Buffer, // new return type; defaults to the async return type of the method
string // async return type of next()
= async function (next, driver, flag = boolean) { const source = await next(); return flag ? source : Buffer.from(source); } }
Type parameters
Name | Type |
---|---|
DC |
extends DriverCommand |
TArgs |
extends readonly any [] = Parameters <DC > |
TReturn |
AsyncReturnType <DC > |
NextRetval |
unknown |
Defined in
packages/types/lib/plugin.ts:51
DriverData
Ƭ DriverData: Record
<string
, unknown
>
Custom session data for a driver.
Defined in
packages/types/lib/driver.ts:464
DriverOpts
Ƭ DriverOpts<C
>: InitialOpts
& DriverCaps
<C
>
Options as set within createSession
, which is a union of InitialOpts
and DriverCaps
.
Type parameters
Name | Type |
---|---|
C |
extends Constraints |
Defined in
packages/types/lib/driver.ts:2023
DriverType
Ƭ DriverType: "driver"
The string referring to a "driver"-type extension
Defined in
ExecuteMethodMap
Ƭ ExecuteMethodMap<T
>: T
extends Plugin
? Readonly
<StringRecord
<PluginExecuteMethodDef
<T
>>> : T
extends Driver
? Readonly
<StringRecord
<DriverExecuteMethodDef
<T
>>> : never
Definition of an execute method (which overloads the behavior of the execute
command) in a Driver
or Plugin
.
Type parameters
Name | Type |
---|---|
T |
extends Plugin | Driver |
Defined in
packages/types/lib/command.ts:135
ExtensionType
Ƭ ExtensionType: DriverType
| PluginType
The strings referring to all extension types.
Defined in
HTTPHeaders
Ƭ HTTPHeaders: Record
<string
, string
| string
[] | number
| boolean
| null
>
An object of HTTP headers.
Defined in
HTTPMethod
Ƭ HTTPMethod: "get"
| "GET"
| "delete"
| "DELETE"
| "head"
| "HEAD"
| "options"
| "OPTIONS"
| "post"
| "POST"
| "put"
| "PUT"
| "patch"
| "PATCH"
| "purge"
| "PURGE"
| "link"
| "LINK"
| "unlink"
| "UNLINK"
Possible HTTP methods, as stolen from axios
.
See
https://npm.im/axios
Defined in
InitialOpts
Ƭ InitialOpts: Merge
<ServerArgs
, ExtraDriverOpts
>
Options as provided to the Driver
constructor.
Defined in
packages/types/lib/driver.ts:2028
KebabToCamel
Ƭ KebabToCamel<S
>: S
extends `${infer P1}-${infer P2}${infer P3}` ? `${Lowercase<P1>}${Uppercase<P2>}${KebabToCamel<P3>}` : Lowercase
<S
>
Converts a kebab-cased string into a camel-cased string.
Type parameters
Name | Type |
---|---|
S |
extends string |
Defined in
KeepAliveTimeoutConfig
Ƭ KeepAliveTimeoutConfig: number
Number of seconds the Appium server should apply as both the keep-alive timeout and the connection timeout for all requests. A value of 0 disables the timeout.
Defined in
packages/types/lib/appium-config.ts:45
KeysToCamelCase
Ƭ KeysToCamelCase<T
>: { [K in keyof T as KebabToCamel<string & K>]: T[K] extends any[] ? KeysToCamelCase<T[K][number]>[] : ObjectToCamel<T[K]> }
Converts an object or array to have camel-cased keys.
Type parameters
Name |
---|
T |
Defined in
LocalTimezoneConfig
Ƭ LocalTimezoneConfig: boolean
Use local timezone for timestamps
Defined in
packages/types/lib/appium-config.ts:49
LogConfig
Ƭ LogConfig: string
Also send log output to this file
Defined in
packages/types/lib/appium-config.ts:53
LogDefRecord
Ƭ LogDefRecord: Record
<string
, LogDef
>
A record of LogDef
objects, keyed by the log type name.
Used in supportedLogTypes
Defined in
packages/types/lib/driver.ts:353
LogFilter
Ƭ LogFilter: { [k: string]
: unknown
; flags?
: string
; replacer?
: string
} & LogFilterText
| LogFilterRegex
Log filtering rule
Defined in
packages/types/lib/appium-config.ts:57
LogFiltersConfig
Ƭ LogFiltersConfig: LogFilter
[]
One or more log filtering rules
Defined in
packages/types/lib/appium-config.ts:71
LogLevelConfig
Ƭ LogLevelConfig: "info"
| "info:debug"
| "info:info"
| "info:warn"
| "info:error"
| "warn"
| "warn:debug"
| "warn:info"
| "warn:warn"
| "warn:error"
| "error"
| "error:debug"
| "error:info"
| "error:warn"
| "error:error"
| "debug"
| "debug:debug"
| "debug:info"
| "debug:warn"
| "debug:error"
Log level (console[:file])
Defined in
packages/types/lib/appium-config.ts:75
LogNoColorsConfig
Ƭ LogNoColorsConfig: boolean
Do not use color in console output
Defined in
packages/types/lib/appium-config.ts:99
LogTimestampConfig
Ƭ LogTimestampConfig: boolean
Show timestamps in console output
Defined in
packages/types/lib/appium-config.ts:103
LongStacktraceConfig
Ƭ LongStacktraceConfig: boolean
Add long stack traces to log entries. Recommended for debugging only.
Defined in
packages/types/lib/appium-config.ts:107
MethodMap
Ƭ MethodMap<T
>: T
extends Plugin
? Readonly
<PluginMethodMap
<T
>> : T
extends Driver
? Readonly
<DriverMethodMap
<T
>> : never
A mapping of URL paths to HTTP methods to either a DriverMethodDef
or PluginMethodDef
.
Extensions can define new methods for the Appium server to map to command names, of the same
format as used in Appium's routes.js
.
Example
{
'/session/:sessionId/new_method': {
GET: {command: 'getNewThing'},
POST: {command: 'setNewThing', payloadParams: {required: ['someParam']}}
}
}
Type parameters
Name | Type |
---|---|
T |
extends Plugin | Driver |
Defined in
packages/types/lib/command.ts:33
NSCapabilities
Ƭ NSCapabilities<C
, NS
>: Partial
<CapsToNSCaps
<ConstraintsToCaps
<C
>, NS
>>
Namespaced caps (where appropriate).
Does not contain BaseCapabilities
; see NSDriverCaps
.
Type parameters
Name | Type |
---|---|
C |
extends Constraints |
NS |
extends string = W3C_APPIUM_PREFIX |
Defined in
packages/types/lib/capabilities.ts:117
NSDriverCaps
Ƭ NSDriverCaps<C
>: BaseNSCapabilities
& NSCapabilities
<C
>
Namespaced capabilities for drivers extending BaseDriver
.
Includes BaseNSCapabilities
.
Type parameters
Name | Type |
---|---|
C |
extends Constraints = Constraints |
Defined in
packages/types/lib/capabilities.ts:168
NamespacedString
Ƭ NamespacedString<S
, NS
>: `${NS}:${S}`
A namespaced string of the format <NS>:<S>
where NS
defaults to the value of
W3C_APPIUM_PREFIX
and S
is a string.
Type parameters
Name | Type |
---|---|
S |
extends string |
NS |
extends string = W3C_APPIUM_PREFIX |
Defined in
packages/types/lib/capabilities.ts:82
NewWindowType
Ƭ NewWindowType: "tab"
| "window"
Defined in
packages/types/lib/driver.ts:511
NextPluginCallback
Ƭ NextPluginCallback<T
>: () => Promise
<T
>
Type parameters
Name | Type |
---|---|
T |
unknown |
Type declaration
▸ (): Promise
<T
>
A reference to an async function which encapsulates what would normally happen if this plugin were not handling a command. Used by PluginInterface.handle.
Given next()
is a NextPluginCallback
: if this is the only plugin
handling the command, await next()
would therefore trigger the normal
handling logic in the driver which is in use. If another plugin is
registered, it would run that plugin's handle
method and return the
result for use here. Note that if this plugin does not call await next()
,
then the normal command logic will not be run, and this plugin is responsible
for managing new command timeouts and command logging, for example:
driver.stopNewCommandTimeout()
-- before running plugin logic
driver.startNewCommandTimeout()
-- after running plugin logic
driver._eventHistory.commands.push({cmd: cmdName, startTime, endTime})
--
after running plugin logic
Returns
Promise
<T
>
Defined in
packages/types/lib/plugin.ts:103
NoPermsCheckConfig
Ƭ NoPermsCheckConfig: boolean
Do not check that needed files are readable and/or writable
Defined in
packages/types/lib/appium-config.ts:111
NormalizedAppiumConfig
Ƭ NormalizedAppiumConfig: Object
"Normalized" config, which is camel-cased (instead of kebab-case, like the schema). It is not flattened.
Type declaration
Name | Type |
---|---|
server |
NormalizedServerConfig |
Defined in
packages/types/lib/config.ts:33
NormalizedServerConfig
Ƭ NormalizedServerConfig: { [Prop in keyof ServerConfigMapping as AppiumServerJsonSchema[Prop] extends WithDest ? AppiumServerJsonSchema[Prop]["appiumCliDest"] : KebabToCamel<Prop>]: ServerConfig[Prop] }
Camel-cased server config. Not flattened.
Defined in
packages/types/lib/config.ts:24
ObjectToCamel
Ƭ ObjectToCamel<T
>: { [K in keyof T as KebabToCamel<string & K>]: T[K] extends Record<string, any> ? KeysToCamelCase<T[K]> : T[K] }
Converts an object with kebab-cased keys into camel-cased keys.
Type parameters
Name |
---|
T |
Defined in
Orientation
Ƭ Orientation: "LANDSCAPE"
| "PORTRAIT"
Defined in
packages/types/lib/driver.ts:558
PluginClass
Ƭ PluginClass<P
>: Class
<P
, PluginStatic
<P
>, [pluginName: string, cliArgs: StringRecord<unknown>]>
Mainly for internal use.
The third parameter is the possible constructor signatures for the plugin class.
Type parameters
Name | Type |
---|---|
P |
extends Plugin = Plugin |
Defined in
packages/types/lib/plugin.ts:122
PluginCommand
Ƭ PluginCommand<D
, TArgs
, TReturn
, NextReturn
>: (next
: NextPluginCallback
<NextReturn
>, driver
: D
, ...args
: TArgs
) => Promise
<TReturn
>
Type parameters
Name | Type |
---|---|
D |
extends ExternalDriver = ExternalDriver |
TArgs |
extends readonly any [] = any [] |
TReturn |
unknown |
NextReturn |
unknown |
Type declaration
▸ (next
, driver
, ...args
): Promise
<TReturn
>
Implementation of a command within a plugin
At minimum, D
must be ExternalDriver
, but a plugin can be more narrow about which drivers it supports.
Parameters
Name | Type |
---|---|
next |
NextPluginCallback <NextReturn > |
driver |
D |
...args |
TArgs |
Returns
Promise
<TReturn
>
Defined in
packages/types/lib/plugin.ts:110
PluginType
Ƭ PluginType: "plugin"
The string referring to a "plugin"-type extension
Defined in
PortConfig
Ƭ PortConfig: number
Port to listen on
Defined in
packages/types/lib/appium-config.ts:115
Position
Ƭ Position: Pick
<Rect
, "x"
| "y"
>
Defined in
packages/types/lib/driver.ts:532
Protocol
Ƭ Protocol: "MJSONWP"
| "W3C"
Defined in
packages/types/lib/driver.ts:571
RelaxedSecurityConfig
Ƭ RelaxedSecurityConfig: boolean
Disable additional security checks, so it is possible to use some advanced features, provided by drivers supporting this option. Only enable it if all the clients are in the trusted network and it's not the case if a client could potentially break out of the session sandbox. Specific features can be overridden by using "deny-insecure"
Defined in
packages/types/lib/appium-config.ts:119
RouteMatcher
Ƭ RouteMatcher: [HTTPMethod
, RegExp
]
Tuple of an HTTP method with a regex matching a request path
Defined in
packages/types/lib/driver.ts:2042
ServerArgs
Ƭ ServerArgs: { [Prop in keyof ServerConfigMapping as SetKeyForProp<Prop>]: KeyOrDefaultForProp<Prop> }
The final shape of the parsed CLI arguments.
These will be camel-cased unless overridden by appiumCliDest
field in schema(s).
Defined in
packages/types/lib/config.ts:62
SessionOverrideConfig
Ƭ SessionOverrideConfig: boolean
Enables session override (clobbering)
Defined in
packages/types/lib/appium-config.ts:123
SettingsUpdateListener
Ƭ SettingsUpdateListener<T
>: (prop
: keyof T
, newValue
: unknown
, curValue
: unknown
) => Promise
<void
>
Type parameters
Name | Type |
---|---|
T |
extends Record <string , unknown > = Record <string , unknown > |
Type declaration
▸ (prop
, newValue
, curValue
): Promise
<void
>
Parameters
Name | Type |
---|---|
prop |
keyof T |
newValue |
unknown |
curValue |
unknown |
Returns
Promise
<void
>
Defined in
packages/types/lib/driver.ts:496
SingularSessionData
Ƭ SingularSessionData<C
, T
>: DriverCaps
<C
> & { error?
: string
; events?
: EventHistory
} & T
Data returned by ISessionCommands.getSession.
Type parameters
Name | Type | Description |
---|---|---|
C |
extends Constraints = Constraints |
The driver's constraints |
T |
extends StringRecord = StringRecord |
Any extra data the driver stuffs in here |
Defined in
packages/types/lib/driver.ts:191
Size
Ƭ Size: Pick
<Rect
, "width"
| "height"
>
Defined in
packages/types/lib/driver.ts:530
StrictCapsConfig
Ƭ StrictCapsConfig: boolean
Cause sessions to fail if desired caps are sent in that Appium does not recognize as valid for the selected device
Defined in
packages/types/lib/appium-config.ts:127
StringRecord
Ƭ StringRecord<T
>: Record
<string
, T
>
Utility type for a object with string-only props
Type parameters
Name | Type |
---|---|
T |
any |
Defined in
TmpConfig
Ƭ TmpConfig: string
Absolute path to directory Appium can use to manage temp files. Defaults to C:\Windows\Temp on Windows and /tmp otherwise.
Defined in
packages/types/lib/appium-config.ts:131
TraceDirConfig
Ƭ TraceDirConfig: string
Absolute path to directory Appium can use to save iOS instrument traces; defaults to
Defined in
packages/types/lib/appium-config.ts:135
UpdateServerCallback
Ƭ UpdateServerCallback: (expressApp
: Express
, httpServer
: AppiumServer
, cliArgs
: Partial
<ServerArgs
>) => Promise
<void
>
Type declaration
▸ (expressApp
, httpServer
, cliArgs
): Promise
<void
>
Optionally updates an Appium express app and http server, by calling methods that may mutate those objects. For example, you could call:
expressApp.get('/foo', handler)
In order to add a new route to Appium with this plugin. Or, you could add new listeners to the httpServer object.
Parameters
Name | Type | Description |
---|---|---|
expressApp |
Express |
the Express 'app' object used by Appium for route handling |
httpServer |
AppiumServer |
the node HTTP server that hosts the app |
cliArgs |
Partial <ServerArgs > |
Arguments from config files, CLI, etc. |
Returns
Promise
<void
>
Defined in
packages/types/lib/server.ts:69
UseDriversConfig
Ƭ UseDriversConfig: string
[]
A list of drivers to activate. By default, all installed drivers will be activated.
Defined in
packages/types/lib/appium-config.ts:139
UsePluginsConfig
Ƭ UsePluginsConfig: string
[]
A list of plugins to activate. To activate all plugins, the value should be an array with a single item "all".
Defined in
packages/types/lib/appium-config.ts:143
W3CDriverCaps
Ƭ W3CDriverCaps<C
>: BaseW3CCapabilities
& W3CCapabilities
<C
>
W3C-style capabilities for drivers extending BaseDriver
.
Includes BaseW3CCapabilities
.
Example
class MyDriver extends BaseDriver<MyDriverConstraints> {
async createSession (w3ccaps: W3CDriverCaps<MyDriverConstraints>, ...args: any[]) {
// ...
}
}
Type parameters
Name | Type |
---|---|
C |
extends Constraints = Constraints |
Defined in
packages/types/lib/capabilities.ts:160
W3C_APPIUM_PREFIX
Ƭ W3C_APPIUM_PREFIX: "appium"
Defined in
packages/types/lib/capabilities.ts:8
WebhookConfig
Ƭ WebhookConfig: string
Also send log output to this http listener
Defined in
packages/types/lib/appium-config.ts:147
Variables
BASE_DESIRED_CAP_CONSTRAINTS
• Const
BASE_DESIRED_CAP_CONSTRAINTS: Object
Type declaration
Name | Type |
---|---|
app |
{ isString : true = true } |
app.isString |
true |
autoLaunch |
{ isBoolean : true = true } |
autoLaunch.isBoolean |
true |
autoWebview |
{ isBoolean : true = true } |
autoWebview.isBoolean |
true |
automationName |
{ isString : true = true } |
automationName.isString |
true |
eventTimings |
{ isBoolean : true = true } |
eventTimings.isBoolean |
true |
fullReset |
{ isBoolean : true = true } |
fullReset.isBoolean |
true |
language |
{ isString : true = true } |
language.isString |
true |
locale |
{ isString : true = true } |
locale.isString |
true |
newCommandTimeout |
{ isNumber : true = true } |
newCommandTimeout.isNumber |
true |
noReset |
{ isBoolean : true = true } |
noReset.isBoolean |
true |
orientation |
{ inclusion : readonly ["LANDSCAPE" , "PORTRAIT" ] } |
orientation.inclusion |
readonly ["LANDSCAPE" , "PORTRAIT" ] |
platformName |
{ isString : true = true; presence : true = true } |
platformName.isString |
true |
platformName.presence |
true |
platformVersion |
{ isString : true = true } |
platformVersion.isString |
true |
printPageSourceOnFindFailure |
{ isBoolean : true = true } |
printPageSourceOnFindFailure.isBoolean |
true |
udid |
{ isString : true = true } |
udid.isString |
true |
webSocketUrl |
{ isBoolean : true = true } |
webSocketUrl.isBoolean |
true |