Sha256: 5e609936d1ff17643f9adf457f6152d2d020ddabdf110e912db79dafed0a818f

Contents?: true

Size: 388 Bytes

Versions: 6

Compression:

Stored size: 388 Bytes

Contents

module Celerity
  # Represents a select list option.
  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

    def selected?
      assert_exists
      @object.isSelected
    end
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
hirobumi-celerity-0.0.5 lib/celerity/elements/option.rb
jarib-celerity-0.0.5.1 lib/celerity/elements/option.rb
jarib-celerity-0.0.5.2 lib/celerity/elements/option.rb
jarib-celerity-0.0.5.4 lib/celerity/elements/option.rb
jarib-celerity-0.0.5.5 lib/celerity/elements/option.rb
jarib-celerity-0.0.5 lib/celerity/elements/option.rb