Last active
August 29, 2015 14:17
-
-
Save coder36/49e1eb5968ecfff1453c to your computer and use it in GitHub Desktop.
Capybara command line demo
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
gem install capybara | |
gem install selenium-webkit | |
irb | |
Capybara.register_driver :selenium do |app| | |
Capybara::Selenium::Driver.new(app, :browser => :chrome) | |
end | |
Capybara.default_driver = :selenium | |
include Capybara::DSL | |
visit "http://www.bbc.co.uk/news" | |
page.has_title? "BBC - Homepage" | |
first( :link, "News" ).click |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment