module CapybaraObjects::ValidationMethods

Public Instance Methods

validate!() click to toggle source

Validates that the component exists this is simply done by searching for the root node. However, a sub class may implement its own stricter validation if required. @raise CapybaraObjects::Exceptions::MissingLocator If a locator hasn't been defined using default_locator or locator (instance)

# File lib/capybara_objects/validation_methods.rb, line 12
def validate!
  raise Exceptions::MissingLocator unless locator.present?
  root_node.present?
end