Exception: Appom::ElementNotFoundError

Inherits:
ElementError show all
Defined in:
lib/appom/exceptions.rb

Overview

Raised when an element cannot be found within the timeout

Instance Attribute Summary

Attributes inherited from AppomError

#context

Instance Method Summary collapse

Methods inherited from AppomError

#detailed_message

Constructor Details

#initialize(selector = nil, timeout = nil) ⇒ ElementNotFoundError

Returns a new instance of ElementNotFoundError.



39
40
41
42
43
44
# File 'lib/appom/exceptions.rb', line 39

def initialize(selector = nil, timeout = nil)
  message = 'Element not found'
  message += " with selector: #{selector}" if selector
  message += " within #{timeout}s" if timeout
  super(message, { selector: selector, timeout: timeout })
end