Exception: Capybara::Poltergeist::JavascriptError
Instance Attribute Summary
Attributes inherited from ClientError
#response
Instance Method Summary
collapse
Methods inherited from ClientError
#initialize
Instance Method Details
#javascript_errors ⇒ Object
44
45
46
|
# File 'lib/capybara/poltergeist/errors.rb', line 44
def javascript_errors
response['args'].first.map { |data| JSErrorItem.new(data['message'], data['stack']) }
end
|
#message ⇒ Object
48
49
50
51
52
53
54
|
# File 'lib/capybara/poltergeist/errors.rb', line 48
def message
"One or more errors were raised in the Javascript code on the page. " \
"If you don't care about these errors, you can ignore them by " \
"setting js_errors: false in your Poltergeist configuration (see " \
"documentation for details)." \
"\n\n#{javascript_errors.map(&:to_s).join("\n")}"
end
|