Sha256: 7d3270e18ecf7059b0fda11108f8ff6c91ffed4e3bfa8c4131b9e645ab6e2ce9

Contents?: true

Size: 558 Bytes

Versions: 14

Compression:

Stored size: 558 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

    def label
      # overrides Container#label
      assert_exists
      @object.getLabelAttribute
    end
  end
end

Version data entries

14 entries across 14 versions & 4 rubygems

Version Path
drnic-celerity-0.0.6.17 lib/celerity/elements/option.rb
jarib-celerity-0.0.6.12 lib/celerity/elements/option.rb
jarib-celerity-0.0.6.14 lib/celerity/elements/option.rb
jarib-celerity-0.0.6.15 lib/celerity/elements/option.rb
jarib-celerity-0.0.6.16 lib/celerity/elements/option.rb
jarib-celerity-0.0.6.17 lib/celerity/elements/option.rb
jarib-celerity-0.0.6.18 lib/celerity/elements/option.rb
jarib-celerity-0.0.6.19 lib/celerity/elements/option.rb
jarib-celerity-0.0.7.1 lib/celerity/elements/option.rb
regularfry-celerity-0.0.6.12 lib/celerity/elements/option.rb
celerity-0.7.4 lib/celerity/elements/option.rb
celerity-0.7.3 lib/celerity/elements/option.rb
celerity-0.0.7.2 lib/celerity/elements/option.rb
celerity-0.0.7 lib/celerity/elements/option.rb