Module: SeleniumRecord::Scopes
- Included in:
- Base
- Defined in:
- lib/selenium_record/scopes.rb
Overview
Helpers for executing actions in custom scope
Defined Under Namespace
Classes: LocatorScope
Instance Method Summary collapse
-
#scope(scope_name, &block) ⇒ Object
Executes the block passed as parameter in the scope associated to the locator referenced by the scope name.
Instance Method Details
#scope(scope_name, &block) ⇒ Object
Executes the block passed as parameter in the scope associated to the locator referenced by the scope name
34 35 36 37 38 |
# 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 |