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
53
54
55
|
# File 'lib/capybara/poltergeist/errors.rb', line 53
def javascript_errors
response['args'].first.map { |data| JSErrorItem.new(data['message'], data['stack']) }
end
|
#message ⇒ Object
57
58
59
60
|
# File 'lib/capybara/poltergeist/errors.rb', line 57
def message
"One or more errors were raised in the Javascript code on the page:\n\n" +
javascript_errors.map(&:to_s).join("\n")
end
|