Sha256: a21bd7bcd98d94f787f70f5ab1aee377ab8b47ec4c1b36a1ad4c1a7f9cdbe0dd

Contents?: true

Size: 684 Bytes

Versions: 5

Compression:

Stored size: 684 Bytes

Contents

module TestCentricity
  class List < UIElement
    attr_accessor :list_item

    def initialize(parent, locator, context)
      @parent  = parent
      @locator = locator
      @context = context
      @type    = :list
      @alt_locator = nil
      list_spec = { :list_item => 'li' }
      define_list_elements(list_spec)
    end

    def define_list_elements(element_spec)
      element_spec.each do | element, value |
        case element
          when :list_item
            @list_item = value
        end
      end
    end

    def get_list_items
      obj, _ = find_element
      object_not_found_exception(obj, nil)
      obj.all(@list_item).collect(&:text)
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
testcentricity_web-0.9.7 lib/testcentricity_web/elements/list.rb
testcentricity_web-0.9.6.3 lib/testcentricity_web/elements/list.rb
testcentricity_web-0.9.6.2 lib/testcentricity_web/elements/list.rb
testcentricity_web-0.9.6.1 lib/testcentricity_web/elements/list.rb
testcentricity_web-0.9.6 lib/testcentricity_web/elements/list.rb