Created
December 12, 2017 02:05
-
-
Save elliotlarson/c39bf0c8cd6913210ee15acbc841387c to your computer and use it in GitHub Desktop.
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
| require 'capybara' | |
| require 'pry' | |
| Capybara.register_driver :selenium do |app| | |
| Capybara::Selenium::Driver.new(app, browser: :chrome) | |
| end | |
| Capybara.default_driver = :selenium | |
| browser = Capybara.current_session | |
| browser.visit('https://google.com') | |
| browser.fill_in('lst-ib', with: 'lorem ipsum') | |
| binding.pry | |
| 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
So, basically, you just use the standard Capybara API you are used to using within Rails, but the methods are off of the
browserinstance.