Class: PageMagic::Element::NotFound

Inherits:
Object
  • Object
show all
Defined in:
lib/page_magic/element/not_found.rb

Overview

class NotFound - Used to represent elements which are missing. All method calls other than to those that check visibility thrown a PageMagic::ElementMissingException exception

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(*_args) ⇒ Object



24
25
26
# File 'lib/page_magic/element/not_found.rb', line 24

def method_missing(*_args)
  raise ElementMissingException, exception.message
end

Instance Method Details

#present?Boolean

Returns - always false.

Returns:

  • (Boolean)
    • always false


19
20
21
# File 'lib/page_magic/element/not_found.rb', line 19

def present?
  false
end

#respond_to_missing?(*_args) ⇒ Boolean

Returns - always true.

Returns:

  • (Boolean)
    • always true


29
30
31
# File 'lib/page_magic/element/not_found.rb', line 29

def respond_to_missing?(*_args)
  true
end

#visible?Boolean

Returns - always false.

Returns:

  • (Boolean)
    • always false


14
15
16
# File 'lib/page_magic/element/not_found.rb', line 14

def visible?
  false
end