class Capybara::Node::Element
Additional useful methods to extend the Capybara::Node::Element
class with
Public Instance Methods
horizontal_position()
click to toggle source
@return [Integer]
The Left-Most pixel’s horizontal position in the DOM (From element.rect)
# File lib/automation_helpers/extensions/capybara/node/element.rb, line 12 def horizontal_position native.rect.x.to_i end
stale?()
click to toggle source
@return [Boolean]
Whether the element is in a stale state or not
# File lib/automation_helpers/extensions/capybara/node/element.rb, line 26 def stale? inspect == 'Obsolete #<Capybara::Node::Element>' end
vertical_position()
click to toggle source
@return [Integer]
The Left-Most pixel’s vertical position in the DOM (From element.rect)
# File lib/automation_helpers/extensions/capybara/node/element.rb, line 19 def vertical_position native.rect.y.to_i end