Files
appium/packages/universal-xml-plugin/README.md
Edgars Eglītis 5070a34739 docs: update READMEs (#19595)
* docs: update universal-xml-plugin readme

* chore: fix line lengths

* docs: update relaxed-caps-plugin readme

* docs: update images-plugin readme

* docs: update fake-plugin readme

* docs: add readme for execute-driver-plugin

* docs: update base-plugin readme

* docs: update test-support readme

* docs: update support readme

* docs: update opencv readme

* docs: update fake-driver readme

* docs: update docutils readme

* docs: update doctor readme

* docs: update base-driver readme

* docs: fix badge for base-driver

* docs: slightly improve base-driver/plugin readme

* docs: fix title for eslint-config-appium-ts

* docs: add badges for non-prerelease packages

* docs: update appium readme

* docs: update some readme links

* chore: address review comments
2024-01-02 21:37:30 +02:00

1.7 KiB

@appium/universal-xml-plugin

Appium plugin for transforming platform-specific XML into a universal syntax

NPM version Downloads

This plugin takes the XML page source retrieved using an iOS or Android driver, and changes various node and attribute names to use common terminology that can apply to both platforms. This is achieved by altering the behavior of the getPageSource and findElement methods.

Motivation

Having compatibility between iOS and Android XML sources can simplify creation of cross-platform tests.

Installation

appium plugin install universal-xml

The plugin must be explicitly activated when launching the Appium server:

appium --use-plugins=universal-xml

Examples

Node names

iOS Android Transformed
XCUIElementTypeButton android.widget.Button Button
XCUIElementTypeAlert android.widget.Toast Alert
XCUIElementTypeSwitch android.widget.Switch SwitchInput

See the mapping file for a full list of node name translations. Any names not specified are left as-is.

Attribute names

iOS Android Transformed
name content-desc axId
label text text
visible displayed visible

Note that this plugin also removes a few attributes from the transformed XML. See the mapping file for a full list of attribute name translations and removed attributes. Any names not specified are left as-is.

License

Apache-2.0