- Ruby (I used v.2.5.1)
- Cucumber, rspec, and bundler
- JAVA JDK
- Android SDK
- Appium
- Appium Library
- Text editor
- Ruby for Windows (https://rubyinstaller.org/).
- Appium (http://appium.io/)
- Android SDK manager and ADB are bundling with android studio (https://developer.android.com/studio/)
- Java JDK (http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html)
- Appium Library (https://rubygems.org/gems/appium_lib/versions/8.0.2)
- Text editor (I used Atom: https://atom.io/)
- Install Ruby
- Edit PATH variable and add new value "C:\Ruby25-x64\bin"
- Run Command Prompt
- Type gem install cucumber
- Type gem install bundler
- Type gem install rspec
- Type gem install appium_lib
- Install JAVA SDK
- Make a new variable with name: JAVA_HOME and value C:\Program Files\Java\java-8
- Make a new variable with name: ANDROID_HOME and value C:\Android\Android-sdk
- Edit PATH variable and add new value "C:\Program File\jdk x.x.x\bin" Note : the directory depend of your JDK and Android SDK directory. "x.x.x" is value of version you have installed.
- Check the JAVA already running by type "java -version" in command promt.
- Download and run Appium installation in (https://github.com/appium/appium-desktop/releases/tag/1.7.0)
- Or you can Install Node.js first (https://nodejs.org/en/) and then open command prompt, type "npm install -g appium" then press enter.
- Set android developer option on.
- Set USB debugging on.
- Install via USB on.
- Open atom text editor write the script and saved it
- Open Appium and start the server
- Open command prompt and go to saved script directory
- Type cucumber
platformName:'android',
deviceName:'your device name',
platformVersion:'your device version',
udid:'Your unique device identifier of the connected physical device',
appActivity:'.HomeActivity',
appPackage:'Android app you want to run ex.com.example.android.myApp',
newCommandTimeout:'How long (in seconds) Appium will wait for a new command'
'adb devices'
- Type in command promt:
'adb shell'
- Then open your apps for which you want to find the appPackage.
- Now run this command:
dumpsys window windows | grep -E ‘mCurrentFocus’
- Then you can find the appPackage and appActivity