Method: PageObject::Accessors#elements
- Defined in:
- lib/page-object/accessors.rb
#elements(name, tag, identifier = {:index => 0}, &block) ⇒ Object
adds a method to return a collection of generic Element objects for a specific tag.
1255 1256 1257 1258 1259 1260 |
# File 'lib/page-object/accessors.rb', line 1255 def elements(name, tag, identifier={:index => 0}, &block) define_method("#{name}_elements") do return call_block(&block) if block_given? platform.elements_for(tag, identifier.clone) end end |