Method: PageObject::Accessors#area
- Defined in:
- lib/page-object/accessors.rb
#area(name, identifier = {:index => 0}, &block) ⇒ Object
adds three methods - one to click the area, another to return the area element, and another to check the area’s existence.
1074 1075 1076 1077 1078 1079 1080 |
# File 'lib/page-object/accessors.rb', line 1074 def area(name, identifier={:index => 0}, &block) standard_methods(name, identifier, 'area_for', &block) define_method(name) do return platform.click_area_for identifier.clone unless block_given? self.send("#{name}_element").click end end |