Class: Capybara::PageObject::Element
- Inherits:
-
Object
- Object
- Capybara::PageObject::Element
- Extended by:
- Forwardable
- Includes:
- CapybaraHelper
- Defined in:
- lib/capybara-pageobject/element.rb
Instance Method Summary collapse
-
#initialize(page, name, selector) ⇒ Element
constructor
A new instance of Element.
- #visible? ⇒ Boolean
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
13 14 15 |
# File 'lib/capybara-pageobject/element.rb', line 13 def visible? if_absent(false) { element.visible? } end |