Exception: Capybara::Apparition::JavascriptError
Instance Attribute Summary
Attributes inherited from ClientError
#response
Instance Method Summary
collapse
Methods inherited from ClientError
#initialize
Instance Method Details
#javascript_errors ⇒ Object
def javascript_errors
response.first.map { |data| JSErrorItem.new(data, data) }
end
59
60
61
|
# File 'lib/capybara/apparition/errors.rb', line 59
def javascript_errors
[message: response]
end
|
#message ⇒ Object
63
64
65
66
67
68
69
|
# File 'lib/capybara/apparition/errors.rb', line 63
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 Apparition configuration (see ' \
'documentation for details).' \
"\n\n#{javascript_errors.map { |err| err[:message] }.join("\n")}"
end
|