How can I access the default webdriver for Selenium 2 with Rails 3 Rspec and Capybara? How can I access the default webdriver for Selenium 2 with Rails 3 Rspec and Capybara? selenium selenium

How can I access the default webdriver for Selenium 2 with Rails 3 Rspec and Capybara?


You can get access to the webdriver in Capybara using:

page.driver.browser

So you would want to do something like:

empty_stars = page.driver.browser.find_element(:class, "empty-stars-container")