Class: Capybara::Node::Element
- Inherits:
-
Base
- Object
- Base
- Capybara::Node::Element
- Defined in:
- lib/capybara/core_ext/node/element.rb
Overview
Capybara::Node::Element namespace
Instance Method Summary collapse
-
#location ⇒ Selenium::WebDriver::Point
Returns the element absolute location on the page.
-
#on_screen?(fully: false) ⇒ Boolean
Validates if the element on the displayed part of the page (screen!).
-
#scroll_into_view! ⇒ Capybara::Node::Element
Scrolls an element into view and return the element to allow method chaining.
-
#size ⇒ Selenium::WebDriver::Dimension
Returns the size of this element.
Instance Method Details
#location ⇒ Selenium::WebDriver::Point
Returns the element absolute location on the page
24 25 26 |
# File 'lib/capybara/core_ext/node/element.rb', line 24 def location synchronize { base.location } end |
#on_screen?(fully: false) ⇒ Boolean
Validates if the element on the displayed part of the page (screen!)
18 19 20 |
# File 'lib/capybara/core_ext/node/element.rb', line 18 def on_screen?(fully: false) synchronize { base.on_screen?(fully) } end |
#scroll_into_view! ⇒ Capybara::Node::Element
Scrolls an element into view and return the element to allow method chaining
11 12 13 14 |
# File 'lib/capybara/core_ext/node/element.rb', line 11 def scroll_into_view! synchronize { base.scroll_into_view! } self end |
#size ⇒ Selenium::WebDriver::Dimension
Returns the size of this element
30 31 32 |
# File 'lib/capybara/core_ext/node/element.rb', line 30 def size synchronize { base.size } end |