follow me icons

Tuesday, June 19, 2012

Capybara running in IE - Internet Explorer

To switch capybara to run in IE or different browser:
Capybara.register_driver :selenium do |app|
  Capybara::Selenium::Driver.new(app, :browser => :internet_explorer)
end

or 

Capybara.register_driver :selenium do |app|
  Capybara::Selenium::Driver.new(app, :browser => :firefox)
end

or 

Capybara.register_driver :selenium do |app|
  Capybara::Selenium::Driver.new(app, :browser => :chrome)
end
For IE, you just need to download the standalone ie driver from selenium webdriver page InternetExplorerDriver otherwise you will get the webdriver warning "the IE driver is moving to a standalone executable... Falling back to bundled DLLs for now.." You can put the IE standalone driver in your rubyxxx/bin folder.

1 comment:

  1. This comment has been removed by a blog administrator.

    ReplyDelete