spec/applications/calculator.rb in win32-autogui-0.3.0 vs spec/applications/calculator.rb in win32-autogui-0.4.0

- old
+ new

@@ -6,26 +6,27 @@ # 'Calculator' used along with the application pid to find the # main application window def initialize(options = {}) defaults = { :name => "calc", - :title => "Calculator" + :title => "Calculator", + :logger_level => Autogui::Logging::DEBUG } super defaults.merge(options) end # the calculator's results window def edit_window main_window.children.find {|w| w.window_class == 'Edit'} end # About dialog, hotkey (VK_MENU, VK_H, VK_A) - def dialog_about - Autogui::EnumerateDesktopWindows.new.find do |w| + def dialog_about(options = {}) + Autogui::EnumerateDesktopWindows.new(options).find do |w| w.title.match(/About Calculator/) && (w.pid == pid) end end - + # the 'CE' button def clear_entry set_focus keystroke(VK_DELETE) end