🚀 Big News:Socket Has Acquired Secure Annex.Learn More
Socket
Book a DemoSign in
Socket

@appium/execute-driver-plugin

Package Overview
Dependencies
Maintainers
3
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@appium/execute-driver-plugin

Plugin for batching and executing Appium driver commands

latest
Source
npmnpm
Version
6.0.2
Version published
Weekly downloads
38K
3.8%
Maintainers
3
Weekly downloads
 
Created
Source

@appium/execute-driver-plugin

Appium plugin for running a driver script in a child process

NPM version Downloads

This plugin adds a new driver command that allows executing scripts in a child process. Currently, the only supported driver type is webdriverio, therefore the script must also be written in JS.

Motivation

Running a driver script in a child process adds a degree of parallelisation, which may result in faster test execution.

[!WARNING] This plugin enables execution of arbitrary JavaScript code. We recommend only using this plugin in a controlled environment. Scripts run in a Node.js vm context with a hardened view of the WebdriverIO driver (host-realm prototype metadata is not exposed), but vm is still not a full security boundary for untrusted code; treat --allow-insecure=…:execute_driver_script as highly privileged.

Installation

appium plugin install execute-driver

The plugin must be explicitly activated when launching the Appium server. Since the input script can be arbitrary JavaScript, this is an insecure feature, and must also be explicitly enabled:

appium --use-plugins=execute-driver --allow-insecure=<driver>:execute_driver_script

<driver> is the name of the driver whose sessions will have access to the plugin.

Usage

const script = `return await driver.getTimeouts();`;
const {result, logs} = await driver.executeDriverScript(script);
// 'result' contains the data returned by the script (in this case, the response to 'getTimeouts')
// 'logs' contains everything logged to console during script execution

Refer to your Appium client documentation for the exact syntax of the script execution command.

Since plugin version 6.0.0, scripts can also use the setTimeout/clearTimeout methods, enabling the use of unconditional delays:

// this will take around one second to execute
const script = `return await new Promise((resolve) => setTimeout(resolve, 1000));`;

License

Apache-2.0

Keywords

automation

FAQs

Package last updated on 23 Apr 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts