JSPM

  • Created
  • Published
  • Downloads 20138
  • Score
    100M100P100Q154842F
  • License Apache-2.0

Plugin for batching and executing driver commands with Appiums

Package Exports

  • @appium/execute-driver-plugin
  • @appium/execute-driver-plugin/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@appium/execute-driver-plugin) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@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.

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=execute_driver_script

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 this command.

License

Apache-2.0