Sha256: e102c2e81f6284fa48cbab34a81f80fcbaacfc1daff34591649b6900c578665b

Contents?: true

Size: 925 Bytes

Versions: 13

Compression:

Stored size: 925 Bytes

Contents

module Watir
  class TextField < Input
    include UserEditable

    NON_TEXT_TYPES = %w[file radio checkbox submit reset image button hidden range color date datetime-local].freeze

    def selector_string
      selector = @selector.dup
      selector[:type] = '(any text type)'
      selector[:tag_name] = 'input'

      if @query_scope.is_a?(Browser) || @query_scope.is_a?(IFrame)
        super
      else
        "#{@query_scope.selector_string} --> #{selector.inspect}"
      end
    end
  end # TextField

  module Container
    def text_field(*args)
      TextField.new(self, extract_selector(args).merge(tag_name: 'input'))
    end

    def text_fields(*args)
      TextFieldCollection.new(self, extract_selector(args).merge(tag_name: 'input'))
    end
  end # Container

  class TextFieldCollection < InputCollection
    private

    def element_class
      TextField
    end
  end # TextFieldCollection
end # Watir

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
watir-6.19.1 lib/watir/elements/text_field.rb
watir-6.19.0 lib/watir/elements/text_field.rb
watir-6.18.0 lib/watir/elements/text_field.rb
watir-6.17.0 lib/watir/elements/text_field.rb
watir-6.16.5 lib/watir/elements/text_field.rb
watir-6.16.4 lib/watir/elements/text_field.rb
watir-6.16.3 lib/watir/elements/text_field.rb
watir-6.16.2 lib/watir/elements/text_field.rb
watir-6.16.1 lib/watir/elements/text_field.rb
watir-6.16.0 lib/watir/elements/text_field.rb
watir-6.15.1 lib/watir/elements/text_field.rb
watir-6.15.0 lib/watir/elements/text_field.rb
watir-6.14.0 lib/watir/elements/text_field.rb