Commit f9e525f7 authored by kytv's avatar kytv
Browse files

Add wait_and_focus helper function

parent bb560d66
......@@ -18,6 +18,15 @@ EOF
return account
end
def wait_and_focus(img, time = 10, window)
begin
@screen.wait(img, time)
rescue FindFailed
@vm.focus_window(window)
@screen.wait(img, time)
end
end
def focus_pidgin_irc_conversation_window(account)
account = account.sub(/^irc\./, '')
@vm.focus_window(".*#{Regexp.escape(account)}$")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment