Class: RFormUnit::OpenFileDialog

Inherits:
Window show all
Defined in:
lib/rformunit/open_file_dialog.rb

Instance Attribute Summary

Attributes inherited from Window

#text, #title

Attributes inherited from BaseControl

#control_id, #parent_win

Instance Method Summary collapse

Methods inherited from Window

#button, #click_button, #close, #exists?, #focus, #focus_control, #get_control_text, #get_text, #hide_dropdown, #pixel_color, #send_control_text, #set_control_text, #show_dropdown, #statusbar_text, #to_s

Methods inherited from BaseControl

#click, #focus, #get_text, #is_enabled?, #is_visible?, #send_text, #set_text

Methods included from Driver

#close_window, #driver, #focus_window, #init, #key_press, #open_file_dialog, #set_autoit_option, #wait_and_focus_window, #wait_for_window, #window_exists?

Constructor Details

#initialize(title = "Open File") ⇒ OpenFileDialog

Returns a new instance of OpenFileDialog.



4
5
6
# File 'lib/rformunit/open_file_dialog.rb', line 4

def initialize(title = "Open File")
  focus_window(title)
end

Instance Method Details

#click_openObject



13
14
15
# File 'lib/rformunit/open_file_dialog.rb', line 13

def click_open
  click_button("Button2")
end

#enter_filepath(file_path) ⇒ Object



8
9
10
11
# File 'lib/rformunit/open_file_dialog.rb', line 8

def enter_filepath(file_path)
  get_text # somehow calling it get it loaded
  set_control_text("Edit1", file_path)
end