Created
March 17, 2011 23:55
-
-
Save theconektd/875388 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 'selenium-webdriver' | |
Capybara.register_driver :selenium do |app| | |
browser = ENV['BROWSER'] ? ENV['BROWSER'].downcase.to_sym : :chrome | |
if browser == :htmlunit | |
capabilities = Selenium::WebDriver::Remote::Capabilities.htmlunit | |
capabilities.javascript_enabled = true | |
Capybara::Driver::Selenium.new app, :browser => :remote, :desired_capabilities => capabilities | |
else | |
Capybara::Driver::Selenium.new app, :browser => browser | |
end | |
end |
I don't always test my Javascript, but when I do I use Selenium.. (when someone else sets it up) Thanks!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
From Andy, for htmlunit, just download: http://code.google.com/p/selenium/downloads/detail?name=selenium-server-standalone-2.0b2.jar&can=2&q= , and run "java -jar selenium-server-standalone-2.0b2.jar" you only need that for htmlunit. I can help with this tomorrow.