1
0
Fork 0
mirror of https://github.com/teamcapybara/capybara.git synced 2022-11-09 12:08:07 -05:00

Merge pull request #999 from randoum/master

Adding simple description to NotSupportedByDriverError exceptions
This commit is contained in:
Jonas Nicklas 2013-03-10 07:09:22 -07:00
commit f5475f1b55
3 changed files with 12 additions and 12 deletions

View file

@ -20,31 +20,31 @@ class Capybara::Driver::Base
end
def execute_script(script)
raise Capybara::NotSupportedByDriverError
raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#execute_script'
end
def evaluate_script(script)
raise Capybara::NotSupportedByDriverError
raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#evaluate_script'
end
def save_screenshot(path, options={})
raise Capybara::NotSupportedByDriverError
raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#save_screenshot'
end
def response_headers
raise Capybara::NotSupportedByDriverError
raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#response_headers'
end
def status_code
raise Capybara::NotSupportedByDriverError
raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#status_code'
end
def within_frame(frame_handle)
raise Capybara::NotSupportedByDriverError
raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#within_frame'
end
def within_window(handle)
raise Capybara::NotSupportedByDriverError
raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#within_window'
end
def invalid_element_errors

View file

@ -70,21 +70,21 @@ module Capybara
end
def path
raise NotSupportedByDriverError
raise NotSupportedByDriverError, 'Capybara::Driver::Node#path'
end
def trigger(event)
raise NotSupportedByDriverError
raise NotSupportedByDriverError, 'Capybara::Driver::Node#trigger'
end
def inspect
%(#<#{self.class} tag="#{tag_name}" path="#{path}">)
rescue NotSupportedByDriverError
rescue NotSupportedByDriverError, 'Capybara::Driver::Node#inspect'
%(#<#{self.class} tag="#{tag_name}">)
end
def ==(other)
raise NotSupportedByDriverError
raise NotSupportedByDriverError, 'Capybara::Driver::Node#=='
end
end
end

View file

@ -221,7 +221,7 @@ module Capybara
def inspect
%(#<Capybara::Element tag="#{tag_name}" path="#{path}">)
rescue NotSupportedByDriverError
rescue NotSupportedByDriverError, 'Capybara::Node::Element#inspect'
%(#<Capybara::Element tag="#{tag_name}">)
end
end