Created
October 18, 2012 10:04
-
-
Save pmeinhardt/3910839 to your computer and use it in GitHub Desktop.
capybara iphone driver
This file contains 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
# features/support/capybara.rb | |
# Configure Capybara for use with cucumber. | |
Capybara.configure do |config| | |
# Use iPhone as the default browser. | |
# config.default_driver = :iphone | |
end |
This file contains 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
# features/support/iphone.rb | |
require "selenium/webdriver" | |
Capybara.register_driver :iphone do |app| | |
# To use this driver, you need to run Selenium's iPhone driver app. | |
# This will allow you to test your applications in iOS Simulator or | |
# directly on a connected iOS device. Basic steps to get this running | |
# are: | |
# | |
# 1. Check out sources: http://code.google.com/p/selenium/source/checkout | |
# 2. Open the XCode project from selenium-read-only/selenium/iphone | |
# 3. Select the appropriate build config (e.g. "iPhone 6.0 Simulator") | |
# 4. Run the build, which will install and start the app | |
# 5. Run cucumber with the `default_driver` set to `:iphone` | |
# | |
# See http://code.google.com/p/selenium/wiki/IPhoneDriver for details. | |
Capybara::Selenium::Driver.new app, browser: :iphone | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment