The Android-ADB Transform controls an Android device attached to your PC using the ADB. This Transform was formerly named MonkeyRunner.
The Monkeyrunner Transform has been tested with the following:
•Python 3.4.1 or newer – Download
•Java - Download
To run the Monkeyrunner demo, use the following steps:
1.Download Android SDK tools for Windows from https://developer.android.com/studio/#downloads
2.Use the downloaded installer to install the tools.
3.Select C:\Program Files\Android\Android Studio for the Destination Folder:
If the following error is displayed, set the PATH environment variable:
'adb' is not recognized as an internal or external command, operable program or batch file.
1.Download Python 3.4.1 (or newer version).
2.Install python-3.4.1.msi (or newer version) on your machine.
3.Enter Python to confirm that Python is working as shown below:
If an error message is displayed, update the PATH variable for python folder.
You can connect to the Android device using a USB cable or Bluetooth:
1.Connect the Android device to your PC using a USB cable.
2.Enable the USB debug mode on the Android device. See: https://www.howtogeek.com/125769/how-to-install-and-use-abd-the-android-debug-bridge-utility/ (Step Two)
1.Enable Bluetooth on the Android device. See: https://tileteam.zendesk.com/hc/en-us/articles/217069448-How-to-Turn-Bluetooth-On-or-Off-with-your-phone-or-tablet-
2.Use the adb devices command to confirm the device is attached.
2.Create a new project or open the MonkeyRunner sample project.
5.Do the following for each MonkeyRunner Transform:
a.Be sure the Monkey Runner Batch Path is set. If it is not, review the installation steps.
b.Set the Device Connection Timeout to the value for your device. (The Galaxy Tab takes as many as 20,000 ms to connect.)
c.Set the Selected Device property to the Device Id for the corresponding device.
To determine the Device Id for all connected devices, enter the adb devices command into a command prompt:
The following TestCases are included in the Monkeyrunner sample project.
The VolumeDemo TestCase adjusts the volume on the Galaxy tablet up and down.
The TouchDemo TestCase saves the contacts on the Galaxy device.
The ScriptExecute TestCase runs the sample.sh script file.
Issue: Batch Path and Jar Path are not displayed in the Transform's Properties
This is usually indicates that Android Studio was incorrectly installed in a local user directory.
There are two ways to fix this:
•Set an environment variable named MXVANDROIDSDKROOT and set its value to the installation directory C:\Users\demouser\AppData\Local\Android\Sdk\
•Uninstall Android Studio and then reinstall it for all users. (should be an option during the installation process).
Then restart the PC and open the project.