diff --git a/lib/capybara/driver/base.rb b/lib/capybara/driver/base.rb index 559a6c66..ae551959 100644 --- a/lib/capybara/driver/base.rb +++ b/lib/capybara/driver/base.rb @@ -11,6 +11,10 @@ class Capybara::Driver::Base raise "Not implemented" end + def evaluate_script(script) + raise Capybara::NotSupportedByDriverError + end + def wait? false end diff --git a/lib/capybara/session.rb b/lib/capybara/session.rb index 941b1cdd..63536b0d 100644 --- a/lib/capybara/session.rb +++ b/lib/capybara/session.rb @@ -171,11 +171,7 @@ module Capybara end def evaluate_script(script) - begin - driver.evaluate_script(script) - rescue NoMethodError - raise NotSupportedByDriverError - end + driver.evaluate_script(script) end private