Sha256: 53ccc8fd9c81af998d53d94bf75ee22fabbfb34fb52377b84011cc73fa654b92

Contents?: true

Size: 636 Bytes

Versions: 4

Compression:

Stored size: 636 Bytes

Contents

module PageObject
  module Elements
    class TextField < Element

      def initialize(element, platform)
        @element = element
        include_platform_for platform
      end

      def append(text)
        element.send_keys text
      end

      protected

      def self.watir_finders
        super + [:title, :value, :text, :label]
      end

      def self.selenium_finders
        super + [:title, :value, :text, :label]
      end

    end

    ::PageObject::Elements.type_to_class[:text] = ::PageObject::Elements::TextField
    ::PageObject::Elements.type_to_class[:password] = ::PageObject::Elements::TextField
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
page-object-2.0.0 lib/page-object/elements/text_field.rb
page-object-1.2.2 lib/page-object/elements/text_field.rb
page-object-1.2.1 lib/page-object/elements/text_field.rb
page-object-1.2.0 lib/page-object/elements/text_field.rb