Sha256: ebbdd566e1b6d0908a00b61ef9dcb13eabb758478cd6b23e750694ffda4703f4
Contents?: true
Size: 834 Bytes
Versions: 14
Compression:
Stored size: 834 Bytes
Contents
module AppPrism module Elements class ElementsCollection include Enumerable def initialize(identifiers, element_or_driver) if identifiers.keys.include?(:android) || identifiers.keys.include?(:ios) @locator = identifiers[:android] if android? @locator = identifiers[:ios] if ios? else @locator = identifiers end @element_or_driver = element_or_driver @sel_elements = @element_or_driver.find_elements(@locator) #maybe allow it to be empty if elements are not visible yet @elements = @sel_elements.map do |elt| AppPrism::Elements::Element.new(elt, @element_or_driver) end end def each(&block) @elements.each(&block) end def [](index) @elements[index] end end end end
Version data entries
14 entries across 14 versions & 1 rubygems