Skip to content

An example of how to get capybara rails working on mobile devices

Notifications You must be signed in to change notification settings

dueckes/capybara_mobile_examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Capybara mobile examples

This code demonstrates how to:

  • run capybara with ios and android devices

  • configure capybara to run with a browser set in the environment

  • get firefox and chrome to simulate being an iphone, by changing the browser size and user agent

To keep the example clean, all normal test framework things like page models, have been ommitted. The interesting code is in spec/acceptance/support/browser.rb

To run

BROWSER=<ios|chrome|chrome_iphone|firefox|ff_iphone> bundle exec rspec spec/acceptance/

Set up

iPhone and iPad

Full instructions at: code.google.com/p/selenium/wiki/IPhoneDriver

  • install xcode, ios sim, blah blah

    git clone https://code.google.com/p/selenium/
  • build iWebdriver.xcodeproj project and run it

    BROWSER=ios bundle exec rspec spec/acceptance/

Andriod

Chrome

Install ChromeDriver code.google.com/p/selenium/wiki/ChromeDriver

BROWSER=chrome bundle exec rspec spec/acceptance/
BROWSER=chrome_iphone bundle exec rspec spec/acceptance/

About

An example of how to get capybara rails working on mobile devices

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published