Exception: Capybara::Lightpanda::JavaScriptError
- Defined in:
- lib/capybara/lightpanda/errors.rb
Instance Attribute Summary collapse
-
#class_name ⇒ Object
readonly
Returns the value of attribute class_name.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
Instance Method Summary collapse
-
#initialize(response) ⇒ JavaScriptError
constructor
A new instance of JavaScriptError.
Constructor Details
#initialize(response) ⇒ JavaScriptError
Returns a new instance of JavaScriptError.
27 28 29 30 31 32 33 |
# File 'lib/capybara/lightpanda/errors.rb', line 27 def initialize(response) @class_name = response.dig("exceptionDetails", "exception", "className") @message = response.dig("exceptionDetails", "exception", "description") || response.dig("exceptionDetails", "text") super(@message) end |
Instance Attribute Details
#class_name ⇒ Object (readonly)
Returns the value of attribute class_name.
25 26 27 |
# File 'lib/capybara/lightpanda/errors.rb', line 25 def class_name @class_name end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
25 26 27 |
# File 'lib/capybara/lightpanda/errors.rb', line 25 def @message end |