Skip to content

Instantly share code, notes, and snippets.

@ericbeland
Created February 27, 2011 20:05
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ericbeland/846482 to your computer and use it in GitHub Desktop.
Save ericbeland/846482 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