Skip to content

Instantly share code, notes, and snippets.

@coder36
Last active August 29, 2015 14:17

Revisions

  1. coder36 revised this gist Mar 24, 2015. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,3 @@

    gem install capybara
    gem install selenium-webkit

    @@ -11,6 +10,8 @@ end

    Capybara.default_driver = :selenium

    include Capybara::DSL

    visit "http://www.bbc.co.uk/news"


  2. coder36 created this gist Mar 24, 2015.
    18 changes: 18 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,18 @@

    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

    visit "http://www.bbc.co.uk/news"


    page.has_title? "BBC - Homepage"
    first( :link, "News" ).click