Android Mobile App & Web Automation

Using Selenium-Cucumber and Appium

Prerequisites :

Setup

Writing script :

  • Create new project directory.
  • Generate feature skeleton using command :“selenium-cucumber gen”.
  • Write steps in feature file using pre-defined steps.
    • locate elements on android web : refer
    • locate elements on android app : refer

Running Script :

  • Connect your android device to machine.
  • Verify attached devices using command : “adb devices”
  • Run “Appium.exe” from extracted Appium directory.
  • Click on “Launch” menu to start Appium server.
  • For Android Web run feature using command  :
    • “cucumber PLATFORM=android BROWSER=browser_name”
    • browser_name = ‘chrome’ or ‘native’
  • For Android App run feature using command  :
    • “cucumber PLATFORM=android APP_PATH=/path/to/apk_file”

Video Tutorial:

Download Example:

4 Responses to Android Mobile App & Web Automation

  1. Pingback: Introducing Android Web & App Automation | Selenium-Cucumber

  2. Michael says:

    Hello,

    We have one framework in my current workplace and we have been using JRuby-Cucumber for a number of years. I see on the pre-reqs above that for the framework on this site to work we need Ruby rather than JRuby, is that correct?

    And if so, could you please let me know the differences? or why Ruby could be better than JRuby so that I can explain it to my team members, as I guess we’ll have to migrate the old framework and all the gems to Ruby if we decide to go this route?

    Thank you!!

    Like

  3. Michael says:

    Hi Sameer,

    Is it possible to run the android web test in some kind of windows android emulator rather than having the phone connected in the computer?

    Like

Comments are closed.