Closed AArmada closed 10 years ago
This is the same issue as #80. Please see my comment there.
Downgrading to FFI 1.9.0 fixed the seg fault issue, but now when I try to use a window I get a LoadError when it tries to use the DLL.
C:\Users\Administrator>irb
irb(main):001:0> require 'rautomation'
=> true
irb(main):002:0> win=RAutomation::Window.new(title: /Notepad/, :adapter => :ms_uia)
=> #<RAutomation::Window:0x27456a8 @adapter=:ms_uia, @window=#<RAutomation::Adapter::MsUia::Window:0
x263ed40 @container=#<RAutomation::Window:0x27456a8 ...>, @locators={:index=>0, :title=>/Notepad/}>>
irb(main):003:0> win.exists?
=> true
irb(main):004:0> win.text_field(class: "Edit").set "Hello"
LoadError: Could not open library 'C:/Ruby193/lib/ruby/gems/1.9.1/gems/rautomation-0.13.0/lib/rautom
ation/adapter/ms_uia/../../../../ext/UiaDll/Release/UiaDll.dll': The specified module could not be f
ound.
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.9.0-x86-mingw32/lib/ffi/library.rb:123:in `block in ffi_lib'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.9.0-x86-mingw32/lib/ffi/library.rb:90:in `map'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.9.0-x86-mingw32/lib/ffi/library.rb:90:in `ffi_lib'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rautomation-0.13.0/lib/rautomation/adapter/ms_uia/uia_dll.rb:116:in `<module:UiaDll>'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rautomation-0.13.0/lib/rautomation/adapter/ms_uia/uia_dll.rb:7:in `<module:MsUia>'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rautomation-0.13.0/lib/rautomation/adapter/ms_uia/uia_dll.rb:6:in `<module:Adapter>'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rautomation-0.13.0/lib/rautomation/adapter/ms_uia/uia_dll.rb:5:in `<module:RAutomation>'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rautomation-0.13.0/lib/rautomation/adapter/ms_uia/uia_dll.rb:4:in `<top (required)>'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rautomation-0.13.0/lib/rautomation/adapter/ms_uia/control.rb:59:in `exist?'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rautomation-0.13.0/lib/rautomation/adapter/ms_uia/text_field.rb:31:in `exist?'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rautomation-0.13.0/lib/rautomation/text_field.rb:37:in `exists?'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rautomation-0.13.0/lib/rautomation/text_field.rb:55:in `block in wait_until_exists'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rautomation-0.13.0/lib/rautomation/wait_helper.rb:15:in `wait_until'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rautomation-0.13.0/lib/rautomation/text_field.rb:55:in `wait_until_exists'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rautomation-0.13.0/lib/rautomation/text_field.rb:15:in `set'
from (irb):4
from C:/Ruby193/bin/irb:12:in `<main>'irb(main):005:0>
You have to install the VS 2010 C++ Runtime On Nov 19, 2013 3:03 PM, "AArmada" notifications@github.com wrote:
Downgrading to FFI 1.9.0 fixed the seg fault issue, but now when I try to use a window I get a LoadError when it tries to use the DLL.
C:\Users\Administrator>irb irb(main):001:0> require 'rautomation' => true irb(main):002:0> win=RAutomation::Window.new(title: /Notepad/, :adapter => :ms_uia) => #<RAutomation::Window:0x27456a8 @adapter=:ms_uia, @window=#<RAutomation::Adapter::MsUia::Window:0 x263ed40 @container=#<RAutomation::Window:0x27456a8 ...>, @locators={:index=>0, :title=>/Notepad/}>>
irb(main):003:0> win.exists? => true irb(main):004:0> win.text_field(class: "Edit").set "Hello" LoadError: Could not open library 'C:/Ruby193/lib/ruby/gems/1.9.1/gems/rautomation-0.13.0/lib/rautom ation/adapter/ms_uia/../../../../ext/UiaDll/Release/UiaDll.dll': The specified module could not be f ound.
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.9.0-x86-mingw32/lib/ffi/library.rb:123:in `block in ffi_lib' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.9.0-x86-mingw32/lib/ffi/library.rb:90:in `map' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.9.0-x86-mingw32/lib/ffi/library.rb:90:in `ffi_lib' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rautomation-0.13.0/lib/rautomation/adapter/ms_uia/uia_dll.rb:116:in `<module:UiaDll>' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rautomation-0.13.0/lib/rautomation/adapter/ms_uia/uia_dll.rb:7:in `<module:MsUia>' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rautomation-0.13.0/lib/rautomation/adapter/ms_uia/uia_dll.rb:6:in `<module:Adapter>' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rautomation-0.13.0/lib/rautomation/adapter/ms_uia/uia_dll.rb:5:in `<module:RAutomation>' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rautomation-0.13.0/lib/rautomation/adapter/ms_uia/uia_dll.rb:4:in `<top (required)>' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rautomation-0.13.0/lib/rautomation/adapter/ms_uia/control.rb:59:in `exist?' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rautomation-0.13.0/lib/rautomation/adapter/ms_uia/text_field.rb:31:in `exist?' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rautomation-0.13.0/lib/rautomation/text_field.rb:37:in `exists?' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rautomation-0.13.0/lib/rautomation/text_field.rb:55:in `block in wait_until_exists' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rautomation-0.13.0/lib/rautomation/wait_helper.rb:15:in `wait_until' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rautomation-0.13.0/lib/rautomation/text_field.rb:55:in `wait_until_exists' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rautomation-0.13.0/lib/rautomation/text_field.rb:15:in `set' from (irb):4 from C:/Ruby193/bin/irb:12:in `<main>'irb(main):005:0>
— Reply to this email directly or view it on GitHubhttps://github.com/jarmo/RAutomation/issues/81#issuecomment-28827463 .
That fixed it. Thanks for your help.
This is still an issue. @jarmo do you have anything against locking ffi
to 1.9.0
in lieu of this issue?
Just released 0.14.1. Thanks for reminding me about this issue!
Closing this issue too. If new version of ffi will be released in the future without this problem then we can loosen up the dependency.
Dependency version of ffi has been loosened up in 0.16.0
(14ef0484c14b1ea121a435fb5b2406807747634c)
When I try to check if a window exists using the ms_uia adapter, ruby crashes with a seg fault. Example
Using ruby 1.9.3p448 (2013-06-27) [i386-mingw32] on Win7x64