Skip to content

Latest commit

 

History

History
40 lines (24 loc) · 1.44 KB

README.rdoc

File metadata and controls

40 lines (24 loc) · 1.44 KB

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/