mirror of
https://github.com/appium/appium.git
synced 2026-10-28 20:31:51 +08:00
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.
36 lines
883 B
TypeScript
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;
|