Class: TestCentricity::FileField
- Defined in:
- lib/testcentricity_web/elements/file_field.rb
Instance Attribute Summary
Attributes inherited from UIElement
#alt_locator, #context, #locator, #parent, #type
Instance Method Summary collapse
- #attach_file(file_path) ⇒ Object
-
#initialize(parent, locator, context) ⇒ FileField
constructor
A new instance of FileField.
Methods inherited from UIElement
#clear_alt_locator, #click, #click_at, #disabled?, #double_click, #drag_and_drop, #drag_by, #enabled?, #exists?, #get_attribute, #get_locator, #get_native_attribute, #get_object_type, #get_siebel_object_type, #get_value, #hidden?, #hover, #invoke_siebel_dialog, #right_click, #send_keys, #set, #set_alt_locator, #verify_value, #visible?, #wait_until_exists, #wait_until_gone, #wait_until_value_changes, #wait_until_value_is, #wait_until_visible
Constructor Details
#initialize(parent, locator, context) ⇒ FileField
Returns a new instance of FileField.
3 4 5 6 7 8 9 |
# File 'lib/testcentricity_web/elements/file_field.rb', line 3 def initialize(parent, locator, context) @parent = parent @locator = locator @context = context @type = :filefield @alt_locator = nil end |
Instance Method Details
#attach_file(file_path) ⇒ Object
11 12 13 14 15 |
# File 'lib/testcentricity_web/elements/file_field.rb', line 11 def attach_file(file_path) Capybara.ignore_hidden_elements = false page.attach_file(@locator, file_path) Capybara.ignore_hidden_elements = true end |