diff --git a/lib/capybara/driver/webkit/node.rb b/lib/capybara/driver/webkit/node.rb index ddfcf67..bbb9a3c 100644 --- a/lib/capybara/driver/webkit/node.rb +++ b/lib/capybara/driver/webkit/node.rb @@ -1,9 +1,5 @@ class Capybara::Driver::Webkit class Node < Capybara::Driver::Node - - class ElementNotDisplayedError < StandardError - end - NBSP = "\xC2\xA0" NBSP.force_encoding("UTF-8") if NBSP.respond_to?(:force_encoding) @@ -33,7 +29,6 @@ class Capybara::Driver::Webkit end def select_option - check_visibility(self) invoke "selectOption" end @@ -47,13 +42,10 @@ class Capybara::Driver::Webkit end def click - check_visibility(self) invoke "click" end def drag_to(element) - check_visibility(self) - check_visibility(element) invoke 'dragTo', element.native end @@ -122,9 +114,5 @@ class Capybara::Driver::Webkit def multiple_select? self.tag_name == "select" && self["multiple"] == "multiple" end - - def check_visibility(element) - raise(ElementNotDisplayedError, "This element is not visible so it may not be interacted with") unless element.visible? - end end end diff --git a/spec/driver_spec.rb b/spec/driver_spec.rb index dc849b5..8b27c60 100644 --- a/spec/driver_spec.rb +++ b/spec/driver_spec.rb @@ -713,13 +713,10 @@ describe Capybara::Driver::Webkit do