chore: add boilerplate for unixml plugin
ADD
packages/appium-plugins/packages/universal-xml/README.md
+# Appium Universal XML Plugin
+
+This is an official Appium plugin designed to make XML source retrieved from iOS and Android use the same node and attribute names, to facilitate cross-platform test writing.
+
+## Features
+
+TODO
+
+## Installation - Server
+
+TODO
+
+## Installation - Client
+
+No special action is needed to make the features available in the various Appium clients, as this plugin simply alters the behavior of the existing "get page source" and "find element" methods.
+
+## Activation
+
+The plugin will not be active unless turned on when invoking the Appium server:
+
+```
+appium --plugins=universal-xml
+```
+
+## Usage
+
+TODO

ADD
packages/appium-plugins/packages/universal-xml/index.js
+import UniversalXMLPlugin from './lib/plugin';
+export default UniversalXMLPlugin;
+export { UniversalXMLPlugin };

ADD
packages/appium-plugins/packages/universal-xml/lib/plugin.js
+/* eslint-disable no-case-declarations */
+
+import BasePlugin from '@appium/base-plugin';
+
+
+export default class UniversalXMLPlugin extends BasePlugin {
+
+ commands = ['getPageSource', 'findElement', 'findElements', 'findElementFromElement',
+ 'findElementsFromElement'];
+
+ async handle (next, /*driver, cmdName, ...args*/) {
+ return await next();
+ }
+}
+
+export { UniversalXMLPlugin };

ADD
packages/appium-plugins/packages/universal-xml/package.json
+{
+ "name": "@appium/universal-xml-plugin",
+ "version": "0.0.1",
+ "description": "Appium plugin for making XML source and XPath queries the same across iOS and Android",
+ "main": "./build/index.js",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/appium/appium-plugins.git"
+ },
+ "appium": {
+ "pluginName": "universal-xml",
+ "mainClass": "UniversalXMLPlugin"
+ },
+ "keywords": [
+ "appium",
+ "automation",
+ "xml",
+ "webdriver"
+ ],
+ "author": "Appium <maintainers@appium.io>",
+ "license": "Apache-2.0",
+ "bugs": {
+ "url": "https://github.com/appium/appium-plugins/issues"
+ },
+ "homepage": "https://github.com/appium/appium-plugins#readme",
+ "dependencies": {
+ "@appium/base-plugin": "^1.5.0",
+ "appium-base-driver": "^8.0.0-beta.0"
+ },
+ "scripts": {
+ "test:unit": "mocha ./build/test/unit/*-specs.js"
+ },
+ "devDependencies": {}
+}

ADD
packages/appium-plugins/packages/universal-xml/test/unit/plugin-specs.js
+import chai from 'chai';
+import chaiAsPromised from 'chai-as-promised';
+import UniversalXMLPlugin from '../../index';
+import BaseDriver from 'appium-base-driver';
+
+chai.use(chaiAsPromised);
+chai.should();
+
+describe('UniversalXMLPlugin#handle', function () {
+ const next = () => true;
+ const driver = new BaseDriver();
+ const p = new UniversalXMLPlugin();
+ describe('getPageSource', function () {
+ it('should get the page source', async function () {
+ await p.handle(next, driver, 'getPageSource').should.eventually.eql(true);
+ });
+ });
+});

ADD
packages/appium-plugins/packages/universal-xml/tsconfig.json
+{
+ "extends": "../../tsconfig.json",
+ "compilerOptions": {
+ "outDir": "./build"
+ },
+ "include": [
+ "./index.js",
+ "./lib/**/*",
+ "./test/**/*"
+ ],
+ "exclude": [
+ "build",
+ "node_modules"
+ ]
+}

chore: add boilerplate for unixml plugin