@appium/universal-xml-plugin 1.0.16 → 1.0.17

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.
Files changed (2) hide show
  1. package/README.md +39 -13
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -1,27 +1,53 @@
1
- # Appium Universal XML Plugin
1
+ # @appium/universal-xml-plugin
2
2
 
3
- This is an official Appium plugin designed to make XML source retrieved from iOS and Android use the same node and attribute names, to facilitate cross-platform test writing.
3
+ > Appium plugin for transforming platform-specific XML into a universal syntax
4
4
 
5
- ## Features
5
+ [![NPM version](http://img.shields.io/npm/v/@appium/universal-xml-plugin.svg)](https://npmjs.org/package/@appium/universal-xml-plugin)
6
+ [![Downloads](http://img.shields.io/npm/dm/@appium/universal-xml-plugin.svg)](https://npmjs.org/package/@appium/universal-xml-plugin)
6
7
 
7
- TODO
8
+ This plugin takes the XML page source retrieved using an iOS or Android driver, and changes various
9
+ node and attribute names to use common terminology that can apply to both platforms. This is
10
+ achieved by altering the behavior of the `getPageSource` and `findElement` methods.
8
11
 
9
- ## Installation - Server
12
+ ## Motivation
10
13
 
11
- TODO
14
+ Having compatibility between iOS and Android XML sources can simplify creation of cross-platform tests.
12
15
 
13
- ## Installation - Client
16
+ ## Installation
14
17
 
15
- No special action is needed to make the features available in the various Appium clients, as this plugin simply alters the behavior of the existing "get page source" and "find element" methods.
16
-
17
- ## Activation
18
+ ```
19
+ appium plugin install universal-xml
20
+ ```
18
21
 
19
- The plugin will not be active unless turned on when invoking the Appium server:
22
+ The plugin must be explicitly activated when launching the Appium server:
20
23
 
21
24
  ```
22
25
  appium --use-plugins=universal-xml
23
26
  ```
24
27
 
25
- ## Usage
28
+ ## Examples
29
+
30
+ ### Node names
31
+ |iOS|Android|Transformed|
32
+ |-|-|-|
33
+ |`XCUIElementTypeButton`|`android.widget.Button`|`Button`|
34
+ |`XCUIElementTypeAlert`|`android.widget.Toast`|`Alert`|
35
+ |`XCUIElementTypeSwitch`|`android.widget.Switch`|`SwitchInput`|
36
+
37
+ See [the mapping file](./lib/node-map.js) for a full list of node name translations. Any names not
38
+ specified are left as-is.
39
+
40
+ ### Attribute names
41
+ |iOS|Android|Transformed|
42
+ |-|-|-|
43
+ |`name`|`content-desc`|`axId`|
44
+ |`label`|`text`|`text`|
45
+ |`visible`|`displayed`|`visible`|
46
+
47
+ Note that this plugin also removes a few attributes from the transformed XML. See
48
+ [the mapping file](./lib/attr-map.js) for a full list of attribute name translations and removed
49
+ attributes. Any names not specified are left as-is.
50
+
51
+ ## License
26
52
 
27
- TODO
53
+ Apache-2.0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appium/universal-xml-plugin",
3
- "version": "1.0.16",
3
+ "version": "1.0.17",
4
4
  "description": "Appium plugin for making XML source and XPath queries the same across iOS and Android",
5
5
  "keywords": [
6
6
  "automation",
@@ -38,7 +38,7 @@
38
38
  "dependencies": {
39
39
  "@types/xmldom": "0.1.34",
40
40
  "@xmldom/xmldom": "0.8.10",
41
- "fast-xml-parser": "4.3.2",
41
+ "fast-xml-parser": "4.3.4",
42
42
  "lodash": "4.17.21",
43
43
  "source-map-support": "0.5.21",
44
44
  "xpath": "0.0.34"
@@ -57,5 +57,5 @@
57
57
  "publishConfig": {
58
58
  "access": "public"
59
59
  },
60
- "gitHead": "5c1d20517cfc8773cd5ffb0f8bb996668d71116b"
60
+ "gitHead": "9cc598a92c2f0d2dfbf40d54698f0ee39b50e4dc"
61
61
  }