Class: Osaka::TypicalFinderDialog
- Inherits:
-
Object
- Object
- Osaka::TypicalFinderDialog
- Defined in:
- lib/osaka/typicalfinderdialog.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#control ⇒ Object
Returns the value of attribute control.
Instance Method Summary collapse
-
#initialize(application_name, own_location) ⇒ TypicalFinderDialog
constructor
A new instance of TypicalFinderDialog.
- #set_folder(pathname) ⇒ Object
Constructor Details
#initialize(application_name, own_location) ⇒ TypicalFinderDialog
Returns a new instance of TypicalFinderDialog.
7 8 9 |
# File 'lib/osaka/typicalfinderdialog.rb', line 7 def initialize(application_name, own_location) @control = Osaka::RemoteControl.new(application_name, own_location) end |
Instance Attribute Details
#control ⇒ Object
Returns the value of attribute control.
5 6 7 |
# File 'lib/osaka/typicalfinderdialog.rb', line 5 def control @control end |
Instance Method Details
#set_folder(pathname) ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/osaka/typicalfinderdialog.rb', line 11 def set_folder(pathname) return if pathname == "." control.keystroke("g", [ :command, :shift ]).wait_until_exists(at.sheet(1)) control.set("value", at.text_field(1).sheet(1), pathname) sleep(1) # Seems this must be here due to the sucking Apple UI. Not found something else to wait for! control.click(at.("Go").sheet(1)).wait_until_not_exists(at.sheet(1)) end |