Using Selenium-Cucumber and Appium
- Selenium-Cucumber gem version >= 2.1.2
- Android SDK API >= 17
- Java (Required for Android SDK)
- Install Ruby
- Install Devkit
- Install Java
- Open Command Prompt (windows)/ Terminal (Mac)
- Install selenium-cucumber gem : “gem install selenium-cucumber” (trouble?)
- Download and setup adt bundle
- Download and Extract Appium
Writing script :
- Create new project directory.
- Generate feature skeleton using command :“selenium-cucumber gen”.
- Write steps in feature file using pre-defined steps.
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”
Pingback: Introducing Android Web & App Automation | Selenium-Cucumber
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?
Yes, selenium-cucumber use Ruby instead of JRuby. But you can use JRuby too, you need to import some JRuby files in your project.
Example – https://github.com/dkowis/Cucumber-JVM-Ruby-Example
After googling I found following links which explains the difference between Ruby & JRuby.
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?