Mobile Installation & Configuration
To work with mobile tests, we will need to install and configure two things:
- Appium Desktop
- ADB - platform tools
Download and install Appium
Recording can be done using specially build Appium Desktop version with added recording support for Oxygen.
- Windows - https://github.com/oxygenhq/appium-desktop/releases/download/v1.13.0/Appium-windows-1.13.0.exe
- OS X - https://github.com/oxygenhq/appium-desktop/releases/download/v1.13.0/Appium-mac-1.13.0.dmg
Download and install adb.exe
ADB - is a short for Android debug bridge, it allows us to have the infrastracture of basic communication with physical devices /simulators that are connected to our computer. In order to get it there are 2 ways : either download and install SDK tools for Windows/Mac (Recommanded) or - download and install Android Studio.
Download link: https://developer.android.com/studio#downloads Scroll a little to the bottom and you will see SDK tools download.
Or - Android Studio Download link: https://developer.android.com/studio
Configuring your ADB
Go to the path where the folder: 'Platform Tools' is located(where you installed the SDK tools from above), and follow these steps:
- In Search, search for and then select: System (Control Panel)
- Click the Advanced system settings link.
- Click Environment Variables. In the section System Variables, find the PATH environment variable and select it. Click Edit. If the PATH environment variable does not exist, click New.
- In the Edit System Variable (or New System Variable) window, specify the value of the PATH environment variable (in the following example its : "C:\Users\bent\AppData\Local\Android\Sdk\platform-tools") and click OK.
- Add JAVA_HOME variable : Create new variable like before , but name it: 'JAVA_HOME' , and insert the value of a path to your JRE or JDK (the folder that contains 'java.exe'), like in the following picture:
- Add ANDROID_HOME variable : Create new variable like before , but name it: 'ANDROID_HOME' , and insert the value of a path to your SDK (the folder that contains the folders: 'platform-tools' and 'build-tools'), like in the following picture:
**NOTE: if you are the administrator of the computer - there should be no issues adding these environment variables in your system variable, but if you add it to a certain user, you must run the Appium Desktop and commands from cmd using the specific user. There could be permission issues so you need to make sure you are doing the configuration properly and all under one user.
Checking adb is configured properly
Now in order to check if adb is configured open command line, and type : 'adb devices' and press Enter. You will now receice a list of all available devices that are connected to your machine.
Unlocking Developer options (Android only)
In order to work with Appium Desktop - you must enable USB debugging , which is only possible while in Developer mode (No worries, it does not harm your phone). You can do it simply by following these steps:
- Go to settings screen
- Click 'System settings'
- Click 'About phone'
- Tap 10 times on 'Build number' - and you should receive a message the developer options are unlocked.
- Go to Developer options (located differently on different phones).
- Toggle 'USB debugging' on.
And that's it, your phone is now ready for mobile automation!
Recognizing your phone using adb commands
In order to see that everything worked well , you need to write the following command in your command line: 'adb devices'.
The list of all devices attached to your computer will be shown.