Created
March 27, 2017 21:18
-
-
Save ndmanvar/3c3e955de04abd5ba0d8b608e9789a49 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rspec' | |
require 'capybara/rspec' | |
require 'appium_capybara' | |
Capybara.register_driver(:appium) do |app| | |
opts = { | |
:caps => { | |
:platformName=>"ios", | |
:deviceName=>"iPad Air Simulator", | |
:platformVersion=>"9.3", | |
:browserName=>"Safari" | |
}, | |
:appium_lib=>{ | |
:sauce_username => "YOUR_SAUCE_USERNAME", | |
:sauce_access_key => "YOUR_SAUCE_ACCESS_KEY" | |
} | |
} | |
Appium::Capybara::Driver.new app, opts | |
end | |
Capybara.default_driver = :appium | |
# pages | |
RSpec.configure do |config| | |
config.after(:each) do |result| | |
Capybara.current_session.driver.quit | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment