Exception: Mechanize::ElementNotFoundError

Inherits:
Error
  • Object
show all
Defined in:
lib/mechanize/element_not_found_error.rb

Overview

Raised when an an element was not found on the Page

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(source, element, conditions) ⇒ ElementNotFoundError

Returns a new instance of ElementNotFoundError.



11
12
13
14
15
16
17
# File 'lib/mechanize/element_not_found_error.rb', line 11

def initialize source, element, conditions
  @source     = source
  @element    = element 
  @conditions = conditions

  super "Element #{element} with conditions #{conditions} was not found"
end

Instance Attribute Details

#conditionsObject (readonly)

Returns the value of attribute conditions.



9
10
11
# File 'lib/mechanize/element_not_found_error.rb', line 9

def conditions
  @conditions
end

#elementObject (readonly)

Returns the value of attribute element.



8
9
10
# File 'lib/mechanize/element_not_found_error.rb', line 8

def element
  @element
end

#sourceObject (readonly)

Returns the value of attribute source.



7
8
9
# File 'lib/mechanize/element_not_found_error.rb', line 7

def source
  @source
end