Sha256: aa6b4bef58d84819fd67b7c1a5cca9cd24aabf0ee0323e54652722de68a995fe

Contents?: true

Size: 456 Bytes

Versions: 6

Compression:

Stored size: 456 Bytes

Contents

module Celerity
  
  #
  # Represents an option in a select list.
  #

  class Option < Element
    include ClickableElement
    include DisabledElement

    TAGS = [ Identifier.new('option')]
    ATTRIBUTES = BASE_ATTRIBUTES | [:selected, :disabled, :label, :value]
    DEFAULT_HOW = :text

    alias_method :select, :click

    # 
    # Is this option selected?
    # 
    
    def selected?
      assert_exists
      @object.isSelected
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
jarib-celerity-0.0.5.10 lib/celerity/elements/option.rb
jarib-celerity-0.0.5.11 lib/celerity/elements/option.rb
jarib-celerity-0.0.5.6 lib/celerity/elements/option.rb
jarib-celerity-0.0.5.7 lib/celerity/elements/option.rb
jarib-celerity-0.0.5.8 lib/celerity/elements/option.rb
jarib-celerity-0.0.5.9 lib/celerity/elements/option.rb