Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist
View gist:782720
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
Capybara::Driver::Selenium.class_eval do
class << self
alias old_driver driver
if false
# override firefox driver in favor of selenium
def driver
@driver ||= begin
driver = Selenium::WebDriver.for :chrome
at_exit { driver.quit }
driver
end
end
else
# fix running Firefox while offline
# http://groups.google.com/group/ruby-capybara/browse_thread/thread/c012c73aa3ee86
def driver
@driver ||= begin
profile = Selenium::WebDriver::Firefox::Profile.new
profile['network.manage-offline-status'] = false
driver = Selenium::WebDriver.for :firefox, :profile => profile
at_exit { driver.quit }
driver
end
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.