lib/watirsplash/autoit.rb in watirsplash-0.2.0 vs lib/watirsplash/autoit.rb in watirsplash-0.2.1

- old
+ new

@@ -21,11 +21,11 @@ # sets specified field's value on window with specified title, # activates window automatically and makes sure that the field's # value got changed def set_field(window_title, field_name, field_value) - wait_until! do + wait_until do activate_window(window_title) && @@autoit.ControlFocus(window_title, "", field_name) == 1 && @@autoit.ControlSetText(window_title, "", field_name, field_value) == 1 && @@autoit.ControlGetText(window_title, "", field_name) == field_value end @@ -33,14 +33,14 @@ # clicks specified button on window with specified title, # activates window automatically and makes sure that the click # was successful def click_button(window_title, button_name) - wait_until! do + wait_until do activate_window(window_title) && @@autoit.ControlFocus(window_title, "", button_name) == 1 && @@autoit.ControlClick(window_title, "", button_name) == 1 && - wait_until(3) {@@autoit.WinExists(window_title) == 0} + wait_until?(3) {@@autoit.WinExists(window_title) == 0} end end # makes window active with specified title # * returns true if activation was successful and false otherwise \ No newline at end of file