Files
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

36 lines
883 B
TypeScript

// uses the same format as NODE_MAP in node-map.js
import type {UniversalNameMap} from './types.js';
export const ATTR_MAP: UniversalNameMap = {
x: {ios: 'x', android: 'x'},
y: {ios: 'y', android: 'y'},
width: {ios: 'width', android: 'width'},
height: {ios: 'height', android: 'height'},
enabled: {ios: 'enabled', android: 'enabled'},
axId: {ios: 'name', android: 'content-desc'},
id: {android: 'resource-id'},
text: {ios: 'label', android: 'text'},
visible: {ios: 'visible', android: 'displayed'},
value: {ios: 'value'},
};
// these attributes shouldn't be mapped and should instead just be removed
export const REMOVE_ATTRS = [
'index',
'type',
'package',
'class',
'checkable',
'checked',
'clickable',
'enabled',
'focusable',
'focused',
'long-clickable',
'password',
'scrollable',
'selected',
'bounds',
'rotation',
] as const;