Sha256: 8ee5ea8cfba5b72029a1aec28f25c37aec09b37f70385cac094dab0660ca1b6b

Contents?: true

Size: 935 Bytes

Versions: 30

Compression:

Stored size: 935 Bytes

Contents

module PageObject
  module IndexedProperties
    class RowOfElements
      include PageObject
      include LoadsPlatform
      extend Accessors

      def initialize (browser, index, identifier_list)
        initialize_browser(browser)

        identifier_list.each do |identifier|
          type = identifier[0]
          name = identifier[1]
          how_and_what = identifier[2].clone # Cannot modify the original...
          how_and_what.each do |key, value|
            how_and_what[key] = value % index
          end
          self.class.send type, name, how_and_what
        end
      end
    end

    class TableOfElements
      include PageObject
      include LoadsPlatform

      def initialize (browser, identifier_list)
        initialize_browser(browser)
        @identifier_list = identifier_list
      end

      def [] (index)
        RowOfElements.new(@browser, index, @identifier_list)
      end
    end
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
page-object-1.0 lib/page-object/indexed_properties.rb
page-object-0.9.8 lib/page-object/indexed_properties.rb
page-object-0.9.7 lib/page-object/indexed_properties.rb
page-object-0.9.6 lib/page-object/indexed_properties.rb
page-object-0.9.5 lib/page-object/indexed_properties.rb
page-object-0.9.4 lib/page-object/indexed_properties.rb
page-object-0.9.3 lib/page-object/indexed_properties.rb
page-object-0.9.2 lib/page-object/indexed_properties.rb
page-object-0.9.1 lib/page-object/indexed_properties.rb
page-object-0.9.0 lib/page-object/indexed_properties.rb
page-object-0.8.10 lib/page-object/indexed_properties.rb
page-object-0.8.9 lib/page-object/indexed_properties.rb
page-object-0.8.8 lib/page-object/indexed_properties.rb
page-object-0.8.7 lib/page-object/indexed_properties.rb
page-object-0.8.6.1 lib/page-object/indexed_properties.rb
page-object-0.8.6 lib/page-object/indexed_properties.rb
page-object-0.8.5 lib/page-object/indexed_properties.rb
page-object-0.8.4 lib/page-object/indexed_properties.rb
page-object-0.8.3 lib/page-object/indexed_properties.rb
page-object-0.8.2 lib/page-object/indexed_properties.rb