@appium/execute-driver-plugin 3.0.22 → 3.0.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +42 -0
- package/package.json +3 -3
package/README.md
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# @appium/execute-driver-plugin
|
|
2
|
+
|
|
3
|
+
> Appium plugin for running a driver script in a child process
|
|
4
|
+
|
|
5
|
+
[](https://npmjs.org/package/@appium/execute-driver-plugin)
|
|
6
|
+
[](https://npmjs.org/package/@appium/execute-driver-plugin)
|
|
7
|
+
|
|
8
|
+
This plugin adds a new driver command that allows executing scripts in a child process. Currently,
|
|
9
|
+
the only supported driver type is `webdriverio`, therefore the script must also be written in JS.
|
|
10
|
+
|
|
11
|
+
## Motivation
|
|
12
|
+
|
|
13
|
+
Running a driver script in a child process adds a degree of parallelisation, which may result in
|
|
14
|
+
faster test execution.
|
|
15
|
+
|
|
16
|
+
## Installation
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
appium plugin install execute-driver
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
The plugin must be explicitly activated when launching the Appium server. Since the input script
|
|
23
|
+
can be arbitrary JavaScript, this is an insecure feature, and must also be explicitly enabled:
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
appium --use-plugins=execute-driver --allow-insecure=execute_driver_script
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Usage
|
|
30
|
+
|
|
31
|
+
```js
|
|
32
|
+
const script = `return await driver.getTimeouts();`;
|
|
33
|
+
const {result, logs} = await driver.executeDriverScript(script);
|
|
34
|
+
// 'result' contains the data returned by the script (in this case, the response to 'getTimeouts')
|
|
35
|
+
// 'logs' contains everything logged to console during script execution
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Refer to your Appium client documentation for the exact syntax of this command.
|
|
39
|
+
|
|
40
|
+
## License
|
|
41
|
+
|
|
42
|
+
Apache-2.0
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@appium/execute-driver-plugin",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.23",
|
|
4
4
|
"description": "Plugin for batching and executing driver commands with Appiums",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"automation",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"lodash": "4.17.21",
|
|
44
44
|
"source-map-support": "0.5.21",
|
|
45
45
|
"vm2": "3.9.19",
|
|
46
|
-
"webdriverio": "8.
|
|
46
|
+
"webdriverio": "8.27.0"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
49
|
"appium": "^2.0.0-beta.35"
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"pluginName": "execute-driver",
|
|
60
60
|
"mainClass": "ExecuteDriverPlugin"
|
|
61
61
|
},
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "76df4d600dcb7c867c37c3d7d302dc7fcc95ae09"
|
|
63
63
|
}
|