Files
appium/packages/universal-xml-plugin
Mykola Mokhnach 5c870329a3 feat(universal-xml-plugin)!: Migrate package to ESM (#22557)
BREAKING CHANGE: @appium/universal-xml-plugin is now an ESM-only package. It can no longer be loaded via CommonJS require(); consumers must use import or dynamic import(). Appium's own extension loader already loads plugins via dynamic import(), so appium plugin install/use universal-xml is unaffected. Deep imports into the package's internals are no longer possible — only the public entry point is exposed via exports.
2026-07-29 21:59:11 +02:00
..
2026-07-25 06:12:06 +00:00

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

Motivation

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

Installation

appium plugin install universal-xml

Usage

Like all plugins, this plugin must be explicitly activated when launching the Appium server:

appium --use-plugins=universal-xml

Once the plugin is running, it will intercept and transform the app source retrieved by the Get Page Source command, as well as element node/attribute names provided in Find Element-related commands.

API

Refer to the Appium documentation.

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