module SeleniumRecord::Scopes

Helpers for executing actions in custom scope

Public Instance Methods

scope(scope_name, &block) click to toggle source

Executes the block passed as parameter in the scope associated to the locator referenced by the scope name @param name [Symbol] The name of the scope. Adding the suffix ‘_locator’

it should match a locator name
# File lib/selenium_record/scopes.rb, line 34
def scope(scope_name, &block)
  scope_obj = LocatorScope.new(self)
  scope_obj.scoped_locator = send "#{scope_name}_locator"
  scope_obj.run(&block)
end