Skip to content

Instantly share code, notes, and snippets.

@coder36
Last active August 29, 2015 14:17
Show Gist options
  • Save coder36/49e1eb5968ecfff1453c to your computer and use it in GitHub Desktop.
Save coder36/49e1eb5968ecfff1453c to your computer and use it in GitHub Desktop.
Capybara command line demo
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