In automation, I'm trying to handle windows popup using rautomation. I've following gems installed:
ffi (1.9.0 x86-mingw32, 1.8.1 x86-mingw32)
rautomation (0.9.2)
I tried following:
require 'rautomation'
window = RAutomation::Window.new :title => "Opening rautomation-0.9.2.gem"
=> #<RAutomation::Window:0x2c4bd30 @adapter=:win_32, @window=#<RAutomation::Adapter::Win32::Window:0x2ccd7c8 @container=#<RAutomation::Windo
w:0x2c4bd30 ...>, @locators={:index=>0, :title=>"Opening rautomation-0.9.2.gem"}>>
By default, adapter isn't set to ffi (It's set to win_32, I'm using windows machine) and hence I tried to set it to ffi:
window.hwnd
=> 1508532
new_window = RAutomation::Window.new :hwnd => 1508532, :adapter => :ffi
But it's resulting into following error:
NameError: uninitialized constant RAutomation::Adapter::Ffi
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rautomation-0.9.2/lib/rautomation/window.rb:67:in `const_get'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rautomation-0.9.2/lib/rautomation/window.rb:67:in `initialize'
from (irb):7:in `new'
from (irb):7
from C:/Ruby193/bin/irb:12:in `<main>'
Following are my questions:
- Why adapter isn't set to ffi even though ffi installed on my machine?
- How to resolve the error that I faced when I tried to set adapter to ffi? (For this I had also done: set RAUTOMATION_ADAPTER=ffi still it's not working)