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.
Recommend to use ruby_lib_core, which works as a Ruby client for Appium. ruby_lib
wraps the core library with some additional helpful methods, but some of wrapped methods may have unexpected complexity.
Ordinary, ruby_lib
worked with class driver, $driver
, mainly.
We can avoid the class driver with current ruby_lib
, but if you'd like to implement your test cases based on instance driver, @driver
, you can consider using ruby_lib_core
first.
12.0.0
is based on Selenium v4
9.8.0
requires Appium over 1.8
9.7.5
can work with Appium under 1.7
$ npm install --location=global appium
$ appium driver install xcuitest # proper driver name to install
$ appium server
Note Please set
server_url
properly like the below since the appium 2 changed the default WebDriver URL to without/wd/hub
to follow W3C.opts = { caps: { automationName: 'xcuitest' platformName: 'ios', app: '/path/to/MyiOS.app' }, appium_lib: { server_url: 'http://127.0.0.1:4723' } } appium_driver = Appium::Driver.new(opts) appium_driver.start_driver
Or please start the appium server with
appium server --base-path=/wd/hub
$ npm install -g appium
$ appium
gem install appium_lib
SAUCE_USERNAME
Sauce usernameSAUCE_ACCESS_KEY
Sauce API keySAUCE_ENDPOINT
Alternative Sauce Appium Server endpoint (only use if directed)(Note: If these variables are set, all tests will use Sauce Labs unless over-ridden in configuration.)
ruby_lib
call the methods.Pry.config.pager = false
is set if you have no .pryrc
files and Pry
is defined.
This repository has examples for running tests in parallel. Read ios_tests to see them.
driver