Sha256: d571d8f674f365e93a6b6bedfe3bc0f08a2e058292b85a20ae23184ce2a7a385
Contents?: true
Size: 959 Bytes
Versions: 19
Compression:
Stored size: 959 Bytes
Contents
module Watir # # Represents an option in a select list. # class Option < HTMLElement # # Selects this option. # # @example # browser.select(id: "foo").options.first.select # alias select click # # Toggles the selected state of this option. # # @example # browser.select(id: "foo").options.first.toggle # alias toggle click # # Clears (i.e. toggles selected state) option. # # @example # browser.select(id: "foo").options.first.clear # def clear click if selected? end # # Is this option selected? # # @return [Boolean] # def selected? element_call { @element.selected? } end # # Returns the text of option. # # getAttribute atom pulls the text value if the label does not exist # # @return [String] # def text attribute_value(:label) end end # Option end # Watir
Version data entries
19 entries across 19 versions & 1 rubygems