Module: SeleniumRecord::Lookup::ClassMethods

Defined in:
lib/selenium_record/lookup.rb

Overview

Contains class method helpers and definition of classes for lookup strategy

Defined Under Namespace

Classes: LookupStrategy, MatchingStrategy, RelativePathStrategy, RelativeTitleStrategy, RootStrategy

Instance Method Summary collapse

Instance Method Details

#lookup_strategy(strategy_sym, opts = {}) ⇒ Object

Parameters:

  • strategy_sym (Symbol)

    lookup strategy corresponding with the name of a lookup strategy locator



51
52
53
54
# File 'lib/selenium_record/lookup.rb', line 51

def lookup_strategy(strategy_sym, opts = {})
  locator_klass = "#{strategy_sym.to_s.camelize}Strategy"
  Module.nesting.shift.const_get(locator_klass).new(self, opts).run
end