Appium, how to install and inspect elements on Android ?

  • Install brew:
    ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/
    install/master/install)"
    

 

  • Install Node.js: brew install node

 

  • Install XCode

 

  • Install XCode Command line

 

  • Install appium. app

 

  • Install android jdk

 

  • Install java

 

  • Export $HOME

 

  • Export $JAVA_HOME – If you are using Mac, your java will be at: /Library/Java/JavaVirtualMachines/jdkx.x.x.jdk/Contents/Home

 

  • Export $ANDROID_HOME – If you have android studio (and on Mac), your jdk will be point to /Library/Android/sdk

 

  • Export $PATH: $PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools

 

  • Create an emulator with adb

 

 

Be sure you have an android emulator created, I normally use genymotion.

 

Inspect this app with appium

 

screen-shot-2016-09-24-at-13-04-41

 

  • Run Appium Doctor and be sure everything is setup:

screen-shot-2016-09-24-at-13-15-01

  • Click on General Settings button and fill the form like this example:

screen-shot-2016-09-24-at-13-04-55

  • Click on Android Settings buttons and fill the form like this example:


screen-shot-2016-09-24-at-13-04-26

  • Open the emulator with adb or genymotion and click to Launch:

screen-shot-2016-09-24-at-13-23-20

  • After this you can click on Inspector button, which will open the app and let you inspect the elements

screen-shot-2016-09-24-at-13-22-40

 

Easy peasy 🙂

Thank you guys, see you next weekend !

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.