Interface: Plugin
@appium/types.Plugin
An instance of a "plugin" extension.
Likewise, the prototype of a Plugin class.
Table of contents
Properties
Properties
cliArgs
• cliArgs: Record<string, any>
CLI args for this plugin (if any are accepted and provided).
Defined in
packages/types/lib/plugin.ts:75
handle
• Optional handle: PluginCommand<ExternalDriver<Constraints, string, StringRecord, StringRecord, DefaultCreateSessionResult<Constraints>, void, StringRecord>, [cmdName: string, ...args: any[]], void, unknown>
Handle an Appium command, optionally running and using or throwing away the value of the original Appium behavior (or the behavior of the next plugin in a plugin chain).
Defined in
packages/types/lib/plugin.ts:84
logger
• logger: AppiumLogger
A logger with prefix identifying the plugin
Defined in
packages/types/lib/plugin.ts:71
name
• name: string
Name of the plugin. Derived from the metadata.
Defined in
packages/types/lib/plugin.ts:67
onUnexpectedShutdown
• Optional onUnexpectedShutdown: (driver: ExternalDriver<Constraints, string, StringRecord, StringRecord, DefaultCreateSessionResult<Constraints>, void, StringRecord>, cause: string | Error) => Promise<void>
Type declaration
▸ (driver, cause): Promise<void>
Listener for unexpected server shutdown, which allows a plugin to do cleanup or take custom actions.
Parameters
| Name | Type |
|---|---|
driver |
ExternalDriver<Constraints, string, StringRecord, StringRecord, DefaultCreateSessionResult<Constraints>, void, StringRecord> |
cause |
string | Error |
Returns
Promise<void>