Sha256: cc0ffde152d9c37bbe3620b6d2d7b6cf995eb8165278fd10322a4b1b52a95d6a
Contents?: true
Size: 1004 Bytes
Versions: 15
Compression:
Stored size: 1004 Bytes
Contents
module PageObject module Platforms module WatirWebDriver module SelectList # # Return the PageObject::Elements::Option for the index provided. Index # is zero based. # # @return [PageObject::Elements::Option] # def [](idx) Object::PageObject::Elements::Option.new(options[idx], :platform => :watir_webdriver) end # # Select a value from the list # def select(value) @element.select(value) end # # Return an array of Options contained in the select lit. # # @return [array of PageObject::Elements::Option] # def options elements = [] options = @element.wd.find_elements(:xpath, child_xpath) options.each do |opt| elements << Object::PageObject::Elements::Option.new(opt, :platform => :watir_webdriver) end elements end end end end end
Version data entries
15 entries across 15 versions & 1 rubygems