Exception: Capybara::Lightpanda::JavaScriptError
- Inherits:
-
BrowserError
- Object
- StandardError
- Error
- BrowserError
- 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.
-
#stack_trace ⇒ Object
readonly
Returns the value of attribute stack_trace.
Attributes inherited from BrowserError
Instance Method Summary collapse
-
#initialize(response) ⇒ JavaScriptError
constructor
A new instance of JavaScriptError.
Methods inherited from BrowserError
Constructor Details
#initialize(response) ⇒ JavaScriptError
Returns a new instance of JavaScriptError.
48 49 50 51 52 53 54 |
# File 'lib/capybara/lightpanda/errors.rb', line 48 def initialize(response) details = response["exceptionDetails"] || {} exception = details["exception"] || {} @class_name = exception["className"] @stack_trace = details["stackTrace"] super((details, exception)) end |
Instance Attribute Details
#class_name ⇒ Object (readonly)
Returns the value of attribute class_name.
46 47 48 |
# File 'lib/capybara/lightpanda/errors.rb', line 46 def class_name @class_name end |
#stack_trace ⇒ Object (readonly)
Returns the value of attribute stack_trace.
46 47 48 |
# File 'lib/capybara/lightpanda/errors.rb', line 46 def stack_trace @stack_trace end |