robertwahler / win32-autogui

A Ruby Win32 GUI testing framework packaged as a RubyGem
http://www.gearheadforhire.com/articles/ruby/win32-autogui/using-ruby-to-drive-windows-applications
MIT License
52 stars 6 forks source link

Timeout::Error: execution expired from calc.running? #13

Open asfarley opened 8 years ago

asfarley commented 8 years ago

Following the example, I get this error when executing calc.running? :

Timeout::Error: execution expired from (eval):3:in SendMessageA' from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/win32-autogui-0.5.2/lib/win32/autogui/window.rb:153:intext' from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/win32-autogui-0.5.2/lib/win32/autogui/application.rb:211:in block (2 levels) in main_window' from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/win32-autogui-0.5.2/lib/win32/autogui/window.rb:35:inblock (2 levels) in find' from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/win32-autogui-0.5.2/lib/win32/autogui/window.rb:51:in each' from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/win32-autogui-0.5.2/lib/win32/autogui/window.rb:35:inblock in find' from C:/Ruby21-x64/lib/ruby/2.1.0/timeout.rb:76:in timeout' from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/win32-autogui-0.5.2/lib/win32/autogui/window.rb:33:infind' from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/win32-autogui-0.5.2/lib/win32/autogui/application.rb:210:in block in main_window' from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/win32-autogui-0.5.2/lib/win32/autogui/application.rb:207:inmain_window' from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/win32-autogui-0.5.2/lib/win32/autogui/application.rb:242:in running?' from (irb):12 from C:/Ruby21-x64/bin/irb:11:in

'

asfarley commented 8 years ago

This doesn't happen using 32-bit Ruby. The .running? method returns 'true' as expected.