module Druid::ElementLocators
Public Class Methods
included(cls)
click to toggle source
# File lib/druid/element_locators.rb, line 6 def self.included(cls) Druid::LocatorGenerator.generate_locators(cls) end
Public Instance Methods
element(tag, identifier={:index => 0})
click to toggle source
# File lib/druid/element_locators.rb, line 10 def element(tag, identifier={:index => 0}) element_for(tag, identifier.clone) end
Private Instance Methods
locator(identifier)
click to toggle source
# File lib/druid/element_locators.rb, line 16 def locator(identifier) identifier[0] ? identifier[0] : {:index => 0} end