Skip to content

Appium Scripts for image recognition, verifying Toast messages and scrolling down/up/left/right

Notifications You must be signed in to change notification settings

syamsasi99/vodQA_Advanced_Appium

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vodQA_Advanced_Appium_Robotframework

Appium Windows Setup For Android

Prerequisites:

  1. Python 2.7 - https://www.python.org/downloads/

  2. JAVA JDK - http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

    • Set environment variable JAVA_HOME under 'System variables' screenshots
  3. ANDROID SDK - https://developer.android.com/studio/index.html

    • Set environment variable ANDROID_HOME under 'System variables' screenshots
  4. Node.js - https://nodejs.org/en/download/. Download and install.

  5. Appium.exe (zip file) (for Appium Inspector) - https://bitbucket.org/appium/appium.app/downloads/

  6. Append the following string to the Path variable under 'System variables'

    • %JAVA_HOME%\bin;%ANDROID_HOME%\build-tools;%ANDROID_HOME%\platforms;%ANDROID_HOME%\platform-tools;%ANDROID_HOME%\tools;C:\Program Files\nodejs;%PYTHONPATH%;%PYTHONPATH%\Scripts; screenshots
  7. Run the following commands to install appium server

    • npm install -g appium
    • npm install wd
  8. ANDROID SDK MANAGER - Open the command prompt and run the command "android"

  9. Robot Framework and Appium Library for robot framework - https://github.com/robotframework/robotframework , http://jollychang.github.io/robotframework-appiumlibrary/doc/AppiumLibrary.html

Run the following commands

  • pip install robotframework==2.8.7
  • pip install robotframework-appiumlibrary==1.3.5 Note: Run 'pip list' to see the installed python packages
  1. Eclipse - https://eclipse.org/downloads/
  2. Nokia RED plugin for eclipse - https://github.com/nokia/RED/releases/tag/0.7.0

Running appium scripts in a real android device

  1. Connect your android phone to PC using usb cable in debugging mode - https://www.kingoapp.com/root-tutorials/how-to-enable-usb-debugging-mode-on-android.htm
  2. Import the repository to eclipse
    • File -> Import -> Git -> Import From Git screenshots
  3. Edit the MFTS.robot file (My First Test Suite) and edit the following fields
    • ${platform_version} - Check your android version
    • ${apk_path} - absolute path of apk file. The apk file is included in the project[app.apk]
    • ${udid} - run adb devices to get the udid of your phone
    • ${phone_name} - Your Phone's name. Preferrably without contain any spaces and special characters screenshots
  4. Run the testsuite by any of the following methods
  • Pybot Command screenshots
  • RED plugin play button [Be in Robot perspective in eclipse] screenshots

Python Library for OCR

https://github.com/jflesch/pyocr

Python Library for Image Recognition

https://pypi.python.org/pypi/pytesseract

#Note: The sample app's source code can be found in this link https://github.com/awslabs/aws-device-farm-sample-app-for-android

The html report will be generated once the test executed

About

Appium Scripts for image recognition, verifying Toast messages and scrolling down/up/left/right

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published