Skip to content

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

node_modules/@appium/types/lib/plugin.ts:75


handle

Optional handle: PluginCommand<ExternalDriver<Constraints, string>, [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

node_modules/@appium/types/lib/plugin.ts:84


logger

logger: AppiumLogger

A logger with prefix identifying the plugin

Defined in

node_modules/@appium/types/lib/plugin.ts:71


name

name: string

Name of the plugin. Derived from the metadata.

Defined in

node_modules/@appium/types/lib/plugin.ts:67


onUnexpectedShutdown

Optional onUnexpectedShutdown: (driver: ExternalDriver<Constraints, string>, 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>
cause string | Error
Returns

Promise<void>

Defined in

node_modules/@appium/types/lib/plugin.ts:79