Class: Vapir::Firefox::FileField

Inherits:
InputElement show all
Includes:
Vapir::FileField
Defined in:
lib/vapir-firefox/elements/file_field.rb

Overview

Description:

Class for FileField element.

Instance Attribute Summary

Attributes inherited from Element

#firefox_socket

Instance Method Summary collapse

Methods inherited from Element

#click, #click_no_wait, #current_style_object, element_object_style, #fire_event, #initialize, #outer_html, #visible?, #wait

Methods included from Container

#element_by_xpath, #element_object_by_xpath, #element_objects_by_xpath, #elements_by_xpath, #extra_for_contained, #innermost_by_node, #innermost_matching_visible_text, #visible_text_nodes

Constructor Details

This class inherits a constructor from Vapir::Firefox::Element

Instance Method Details

#set(path) ⇒ Object

Description:

Sets the path of the file in the textbox.

Input:

path - Path of the file.


19
20
21
22
23
24
# File 'lib/vapir-firefox/elements/file_field.rb', line 19

def set(path)
  assert_exists do
    element_object.value=path
    fire_event("onChange")
  end
end