@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.
- package/README.md +39 -13
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,27 +1,53 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @appium/universal-xml-plugin
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
> Appium plugin for transforming platform-specific XML into a universal syntax
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
[](https://npmjs.org/package/@appium/universal-xml-plugin)
|
|
6
|
+
[](https://npmjs.org/package/@appium/universal-xml-plugin)
|
|
6
7
|
|
|
7
|
-
|
|
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
|
-
##
|
|
12
|
+
## Motivation
|
|
10
13
|
|
|
11
|
-
|
|
14
|
+
Having compatibility between iOS and Android XML sources can simplify creation of cross-platform tests.
|
|
12
15
|
|
|
13
|
-
## Installation
|
|
16
|
+
## Installation
|
|
14
17
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
+
```
|
|
19
|
+
appium plugin install universal-xml
|
|
20
|
+
```
|
|
18
21
|
|
|
19
|
-
The plugin
|
|
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
|
-
##
|
|
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
|
-
|
|
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.
|
|
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.
|
|
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": "
|
|
60
|
+
"gitHead": "9cc598a92c2f0d2dfbf40d54698f0ee39b50e4dc"
|
|
61
61
|
}
|