Sha256: 583c16836753b272d168cccdacf8a825dfbb8f8fc307d68e172baebcdb276285

Contents?: true

Size: 559 Bytes

Versions: 9

Compression:

Stored size: 559 Bytes

Contents

# encoding: utf-8
module Watir
  class FileField < Input
    identifier :type => 'file'

    container_method  :file_field
    collection_method :file_fields

    #
    # Set the file field to the given path
    #
    # @param [String] a value
    #

    def set(value)
      assert_exists
      @element.send_keys value
    end

    #
    # Return the value of this field
    #
    # @return [String]
    #

    def value
      # since 'value' is an attribute on input fields, we override this here
      assert_exists
      @element.value
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
watir-webdriver-0.0.6 lib/watir-webdriver/elements/file_field.rb
watir-webdriver-0.0.5 lib/watir-webdriver/elements/file_field.rb
watir-webdriver-0.0.4 lib/watir-webdriver/elements/file_field.rb
watir-webdriver-0.0.3 lib/watir-webdriver/elements/file_field.rb
watir-webdriver-0.0.2 lib/watir-webdriver/elements/file_field.rb
watir-webdriver-0.0.1 lib/watir-webdriver/elements/file_field.rb
watir-webdriver-0.0.1.dev7 lib/watir-webdriver/elements/file_field.rb
watir-webdriver-0.0.1.dev6 lib/watir-webdriver/elements/file_field.rb
watir-webdriver-0.0.1.dev5 lib/watir-webdriver/elements/file_field.rb