jnyman/lucid — Issue #1: Capybara Drivers for Other Browsers
Author: jnyman
Created: 2011-12-06 16:02:35+00:00
State: open
Labels: Bug

Right now Capybara will work if you use the basic Session object. In other words:

browser = Capybara::Session.new :selenium
page = TestPage.new(browser)
page.view("http://localhost:4567")

This works fine. However, that will only run on Firefox. To run on another browser with Capybara, you have to register a driver. In that case, you're no longer using the Capybara::Session. Here is example logic:

Capybara.register_driver :selenium do |app|
Capybara::Selenium::Driver.new(app, :browser => :internet_explorer)
#Capybara::Selenium::Driver.new(app, :browser => :chrome)
end
Capybara.default_driver = :selenium

If you do this now, get_platform_for will raise the "Unable to create a platform object for ." RuntimeError.