Sha256: 80e7389d9cd4dd73df0f3afff0bb4560407dec2b40b57814a36051cab59f9b18

Contents?: true

Size: 834 Bytes

Versions: 1

Compression:

Stored size: 834 Bytes

Contents

module Fluent
  module Platforms
    module WatirWebDriver
      module SelectList
        
        def [](index)
          ::Fluent::WebElements::Option.new(options[index], :platform => :watir_webdriver)
        end
        
        # Provides an array of Option objects that are contained within
        # a select list object.
        #
        # @return [Array] Fluent::WebElements::Option objects
        def options
          elements = []
          options = web_element.wd.find_elements(:xpath, option_xpath)
          options.each do |option|
            elements << ::Fluent::WebElements::Option.new(option, :platform => :watir_webdriver)
          end
          elements
        end
        
        def option_xpath
          './/child::option'
        end
        
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fluent-0.1.0 lib/fluent/platform_watir/platform_web_elements/select_list.rb