diff --git a/lib/capybara/driver/node.rb b/lib/capybara/driver/node.rb index 8cc2eeff9..017b390d9 100644 --- a/lib/capybara/driver/node.rb +++ b/lib/capybara/driver/node.rb @@ -87,7 +87,7 @@ def trigger(event) def inspect %(#<#{self.class} tag="#{tag_name}" path="#{path}">) - rescue NotSupportedByDriverError, 'Capybara::Driver::Node#inspect' + rescue NotSupportedByDriverError %(#<#{self.class} tag="#{tag_name}">) end diff --git a/lib/capybara/node/element.rb b/lib/capybara/node/element.rb index 3eb693edf..21cbe2091 100644 --- a/lib/capybara/node/element.rb +++ b/lib/capybara/node/element.rb @@ -240,7 +240,7 @@ def reload def inspect %(#) - rescue NotSupportedByDriverError, 'Capybara::Node::Element#inspect' + rescue NotSupportedByDriverError %(#) end end