Exception: Appom::ElementStateError
- Inherits:
-
ElementError
- Object
- StandardError
- AppomError
- ElementError
- Appom::ElementStateError
- Defined in:
- lib/appom/exceptions.rb
Overview
Raised when an element is found but not in the expected state
Instance Attribute Summary
Attributes inherited from AppomError
Instance Method Summary collapse
-
#initialize(element_name, expected_state, actual_state = nil) ⇒ ElementStateError
constructor
A new instance of ElementStateError.
Methods inherited from AppomError
Constructor Details
#initialize(element_name, expected_state, actual_state = nil) ⇒ ElementStateError
Returns a new instance of ElementStateError.
49 50 51 52 53 |
# File 'lib/appom/exceptions.rb', line 49 def initialize(element_name, expected_state, actual_state = nil) = "Element '#{element_name}' expected to be #{expected_state}" += " but was #{actual_state}" if actual_state super(, { element: element_name, expected: expected_state, actual: actual_state }) end |