Class: Capybara::PageObject::Element

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Includes:
CapybaraHelper
Defined in:
lib/capybara-pageobject/element.rb

Direct Known Subclasses

Action, Attribute

Instance Method Summary collapse

Constructor Details

#initialize(page, name, selector) ⇒ Element

Returns a new instance of Element.



7
8
9
10
11
# File 'lib/capybara-pageobject/element.rb', line 7

def initialize page, name, selector
  @page = page
  @name = name
  @selector = selector
end

Instance Method Details

#visible?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/capybara-pageobject/element.rb', line 13

def visible?
  if_absent(false) { element.visible? }
end