Sha256: b69b76ad5ec8feecc165226d4f68ac218df86aae9ce018140c13efe29e86d119

Contents?: true

Size: 570 Bytes

Versions: 26

Compression:

Stored size: 570 Bytes

Contents

module FireWatir
  #
  # Description:
  #   Class for FileField element.
  #
  class FileField < InputElement
    INPUT_TYPES = ["file"]

    #
    # Description:
    #   Sets the path of the file in the textbox.
    #
    # Input:
    #   path - Path of the file.
    #
    def set(path)
      assert_exists

      path.gsub!("\\", "\\\\\\")

      jssh_socket.send("#{element_object}.value = \"#{path}\";\n", 0)
      read_socket()
      @o.fireEvent("onChange")
      
      @@current_level = 0
    end

  end # FileField
end # FireWatir

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
firewatir-1.9.4 lib/firewatir/elements/file_field.rb
firewatir-1.9.3 lib/firewatir/elements/file_field.rb
firewatir-1.9.2 lib/firewatir/elements/file_field.rb
firewatir-1.9.2.rc1 lib/firewatir/elements/file_field.rb
firewatir-1.9.1 lib/firewatir/elements/file_field.rb
firewatir-1.9.1.rc1 lib/firewatir/elements/file_field.rb
firewatir-1.9.0 lib/firewatir/elements/file_field.rb
firewatir-1.9.0.rc7 lib/firewatir/elements/file_field.rb
firewatir-1.9.0.rc6 lib/firewatir/elements/file_field.rb
firewatir-1.9.0.rc5 lib/firewatir/elements/file_field.rb
firewatir-1.9.0.rc4 lib/firewatir/elements/file_field.rb
firewatir-1.9.0.rc3 lib/firewatir/elements/file_field.rb
firewatir-1.9.0.rc2 lib/firewatir/elements/file_field.rb
firewatir-1.9.0.rc1 lib/firewatir/elements/file_field.rb
firewatir-1.8.1 lib/firewatir/elements/file_field.rb
firewatir-1.8.1.rc1 lib/firewatir/elements/file_field.rb
firewatir-1.8.0 lib/firewatir/elements/file_field.rb
firewatir-1.8.0.rc1 lib/firewatir/elements/file_field.rb
firewatir-1.7.1 lib/firewatir/elements/file_field.rb
firewatir-1.7.0 lib/firewatir/elements/file_field.rb