appium_lib 

Helper methods for writing cross platform (iOS, Android) tests in Ruby using Appium. Note that user waits should not exceed 120 seconds if they’re going to run on Sauce Labs.
Make sure you’re using Ruby 1.9.3+ with upgraded rubygems and bundler.
Start appium server
node server.js
Install / Upgrade
Update rubygems and bundler.
gem update --system ;\ gem update bundler
Install the latest gem release.
gem uninstall -aIx appium_lib ;\ gem install --no-rdoc --no-ri appium_lib
Simple Usage
require 'rubygems' require 'appium_lib' # Start iOS driver app = { device: :ios, app_path: '/path/to/MyiOS.app'} Appium::Driver.new(app).start_driver # Start Android driver apk = { device: :android app_path: '/path/to/the.apk', app_package: 'com.example.pkg', app_activity: '.act.Start', app_wait_activity: '.act.Start' } Appium::Driver.new(apk).start_driver # Define the methods on all objects. Appium.promote_appium_methods Object
iOS env vars
APP_PATH
Path to the .app folder
Android env vars
APP_PATH
Path to the apkAPP_PACKAGE
The APK’s packageAPP_ACTIVITY
Activity to startAPP_WAIT_ACTIVITY
Optional. Activity to wait for.
Sauce Labs env vars
APP_NAME
Name of the test runSAUCE_USERNAME
Sauce usernameSAUCE_ACCESS_KEY
Sauce API key
Troubleshooting
- Does
adb kill-server; adb devices
list an active Android device? - Have you defined the proper env vars?
APP_PATH, APP_PACKAGE, APP_ACTIVITY, APP_WAIT_ACTIVITY
- Are you running appium from source?
node server.js