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
47
48
49
|
# File 'lib/capybara/poltergeist/errors.rb', line 47
def javascript_errors
response['args'].first.map { |data| JSErrorItem.new(data['message'], data['stack']) }
end
|
#message ⇒ Object
51
52
53
54
55
56
57
|
# File 'lib/capybara/poltergeist/errors.rb', line 51
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
|