Exception: SeleniumSurfer::ContextError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/selenium_surfer/errors.rb

Overview

Base class for context errors

Direct Known Subclasses

EmptySetError, WebDriverError

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#contextObject (readonly)

Returns the value of attribute context.



15
16
17
# File 'lib/selenium_surfer/errors.rb', line 15

def context
  @context
end

#sourceObject (readonly)

Returns the value of attribute source.



15
16
17
# File 'lib/selenium_surfer/errors.rb', line 15

def source
  @source
end