Skip to content

Instantly share code, notes, and snippets.

@thermistor
Forked from ericbeland/gist:846482
Created July 13, 2012 20:44
Show Gist options
  • Save thermistor/3107339 to your computer and use it in GitHub Desktop.
Save thermistor/3107339 to your computer and use it in GitHub Desktop.
Slow Down webdriver in Capybara (Monkeypatch for 0.1.3)
# This is a total hack to slow down webdriver in Capybara
# so you can more easily watch what is happening.
# paste this above the top of a Capybara Webdriver RSpec test if you need to debug something in slo-mo
require 'selenium-webdriver'
module ::Selenium::WebDriver::Remote
class Bridge
def execute(*args)
res = raw_execute(*args)['value']
sleep 0.5
res
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment