Install Appium Gesture Plugin Learn how to install Appium Gesture Plugin with Kobiton’s basic Appium 2 server. Prerequisites deviceConnect 4.9 or later The Mac mini host must have Internet access to download the plugin. You will need console or terminal access to the Mac mini to install an Appium plugin. You will need to be able to download or transfer the plugin to the Mac mini. Some familiarity with the command line is required. Note this process will involve system downtime of a few minutes. Intended Users This document is intended to be used by Hybrid and On-Prem/Standalone customers hosting their own Mac mini and devices. If you are using Kobiton to host your devices, please contact Kobiton support for further assistance. When contacting Kobiton support, please include the name of the plugin, a link to the public Git repository, and the installation request URL to help expedite the process. Note that some plugins may not be fully compatible with Appium 2. Plugin support is managed by your administrators, but we’re happy to install or remove plugins upon request. The plugin is not available for Public Cloud devices. The Appium Plugin must be installed on all the Mac minis in your environment that host the devices you will be testing with the Appium Plugin. Repeat the steps below for each Mac mini. Steps to install a plugin In this section, the example plugin to install is the Appium Gesture Plugin. In the Terminal, run the below command to install the plugin: APPIUM_HOME=/usr/local/deviceconnect/appium-drivers \ ANDROID_HOME=/usr/local/deviceconnect/android \ node /usr/local/deviceconnect/appium-server/index.js plugin install \ --source=npm appium-gestures-plugin Extract the necessary files to the appium-drivers folder with this command: tar -C /usr/local/deviceconnect/appium-drivers \ -xvJf /var/puppet/packages/deviceconnect/files/appium-drivers.tgz Verify the plugin has been installed with: APPIUM_HOME=/usr/local/deviceconnect/appium-drivers \ ANDROID_HOME=/usr/local/deviceconnect/android \ node /usr/local/deviceconnect/appium-server/index.js plugin list If the plugin is installed successfully, the output of the above should be: ✔ Listing available plugins - gestures@4.0.1 [installed (npm)] - images [not installed] - execute-driver [not installed] - relaxed-caps [not installed] - universal-xml [not installed] Activate the plugin To activate the plugin, the launch arguments of basic Appium 2 Server need to be modified. Back up the file run-appium.sh inside /usr/local/deviceconnect/Build/Mono/. Edit the above file using any editor of choice. Add the argument --use-plugins=gestures at the end of the below text in the file: APPIUM_HOME=$DCDIR/appium-drivers ANDROID_HOME=$DCDIR/android exec $DCDIR/appium-server/index.js -a 127.0.0.1 -p 4723 --allow-insecure chromedriver_autodownload --use-plugins=gestures --log-no-colors -G localhost:10191 After editing, the above text becomes: APPIUM_HOME=$DCDIR/appium-drivers ANDROID_HOME=$DCDIR/android exec $DCDIR/appium-server/index.js -a 127.0.0.1 -p 4723 --allow-insecure chromedriver_autodownload --log-no-colors -G localhost:10191 --use-plugins=gestures Save the file, then end the current appium-server process with this command: pkill -9 -f appium-server After appium-server ends, it is automatically restarted with the argument to use the new plugin. Verify this by searching for gestures@4.0.1 (ACTIVE) in the deviceConnect service logs: cat /usr/local/deviceconnect/Logs/MobileLabs.DeviceConnect.Services.log \ | grep 'gestures@4.0.1 (ACTIVE)' The plugin was activated successfully if gestures@4.0.1 (ACTIVE) is in the output. If you don’t see gestures@4.0.1 (ACTIVE) in the output, retry the above command several times. Finally, launch a Basic Appium 2 session with a script that uses the plugin to verify it works correctly.