Class: SeleniumRecord::Scopes::LocatorScope
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- SeleniumRecord::Scopes::LocatorScope
show all
- Includes:
- Actions
- Defined in:
- lib/selenium_record/scopes.rb
Overview
Class for giving custom scope to selenium objects
Instance Attribute Summary collapse
Instance Method Summary
collapse
Methods included from Actions
#accept_popup, #choose_menu, choose_option, #clear, #click, #click_link, #click_on, #click_wait, #fill, #focus, #pop_last, #select_from_chosen, #submit, #textarea_content
Instance Attribute Details
#scoped_locator ⇒ Object
Returns the value of attribute scoped_locator.
7
8
9
|
# File 'lib/selenium_record/scopes.rb', line 7
def scoped_locator
@scoped_locator
end
|
Instance Method Details
#class ⇒ Object
25
26
27
|
# File 'lib/selenium_record/scopes.rb', line 25
def class
__getobj__.class
end
|
#find(locator) ⇒ Object
13
14
15
|
# File 'lib/selenium_record/scopes.rb', line 13
def find(locator)
root_el.find_element(locator)
end
|
#find_elements(locator) ⇒ Object
17
18
19
|
# File 'lib/selenium_record/scopes.rb', line 17
def find_elements(locator)
root_el.find_elements(locator)
end
|
#root_el ⇒ Object
9
10
11
|
# File 'lib/selenium_record/scopes.rb', line 9
def root_el
@root_el ||= __rootel__.find_element(scoped_locator)
end
|
#run(&block) ⇒ Object
21
22
23
|
# File 'lib/selenium_record/scopes.rb', line 21
def run(&block)
instance_eval(&block)
end
|