Exception: SeleniumSurfer::ContextError
- Inherits:
-
StandardError
- Object
- StandardError
- SeleniumSurfer::ContextError
- Defined in:
- lib/selenium_surfer/errors.rb
Overview
Base class for context errors
Direct Known Subclasses
Instance Attribute Summary collapse
-
#context ⇒ Object
readonly
Returns the value of attribute context.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
Instance Method Summary collapse
-
#initialize(_msg, _context) ⇒ ContextError
constructor
A new instance of ContextError.
Constructor Details
#initialize(_msg, _context) ⇒ ContextError
Returns a new instance of ContextError.
17 18 19 20 21 |
# File 'lib/selenium_surfer/errors.rb', line 17 def initialize(_msg, _context) super _msg @context = _context @source = _context.root_context.page_source rescue nil # cache page source for future reference end |
Instance Attribute Details
#context ⇒ Object (readonly)
Returns the value of attribute context.
15 16 17 |
# File 'lib/selenium_surfer/errors.rb', line 15 def context @context end |
#source ⇒ Object (readonly)
Returns the value of attribute source.
15 16 17 |
# File 'lib/selenium_surfer/errors.rb', line 15 def source @source end |