Closed mxygem closed 6 years ago
I'm dusting off this library myself so that I can use it on a project and I am running into a similar error. Rubygems copy on Windows 10 for me, however.
32-bit ruby?
Both 32 and 64.
2.4, 64-bit for me.
C:/Ruby/Ruby24-x64/lib/ruby/gems/2.4.0/gems/ffi-1.9.18-x64-mingw32/lib/ffi/library.rb:147:in `block in ffi_lib': Could not open library 'C:/Ruby/Ruby24-x64/lib/ruby/gems/2.4.0/gems/rautomation-0.17.0/lib/rautomation/adapter/win_32/../../../../ext/IAccessibleDLL/Release/iaccessibleDll.dll': �D� (LoadError)
I don't believe 64-bit would ever work because we don't package 64-bit DLLs that are loaded.
That doesn't address the 32-bit one though (haven't had a chance to look).
Oh. RAutomation just doesn't support 64-bit Ruby at all. That...will be become increasingly problematic as time goes on.
Edit: switching to a 32-bit Ruby 2.4 has things running fine for me, now.
Automation would if 64-bit binaries were built and strategically loaded depending on the bit-ness of ruby.
For the uia
gem that I wrote, I have a feature branch where I took a stab a long time ago at trying to do this...and it mostly works IIRC but I think I had some issues with the specs that I wasn't quite comfortable with releasing though.
At the risk of derailing the thread and because I am a simple man: remind me why we use DLLS in the first place instead of going pure Ruby?
Correction: it worked until I tried switching from the default adapter to the :ms_uia
adapter. Now the DLL is having trouble again.
LoadError: Could not open library 'C:/Ruby/Ruby24/lib/ruby/gems/2.4.0/gems/rautomation-0.17.0/lib/rautomation/adapter/ms_uia/../../../../ext/UiaDll/Release/UiaDll.dll': The specified module could not be found.
The DLLs are used because straight up win32 calls are not enough to be able to drive automation via UI Automation and require either COM or like we do here, a managed C++ DLL that acts as the bridge into a C# DLL to more reliably interact with UI Automation.
So the absence of x64 is simply because the work hasn't been put in in order to compile both the x86 / x64 DLLs and package them.
The "specified module could not be found" sounds like it's a problem either with running 64-bit rubies or the absence of the 32-bit C++ runtime that is required. I can't exactly recall, but I think this one requires the VC++ 2010 runtime? It's either that or 2012.
Heya!
Trying to run RAutomation via a local copy so that I can remove the mandatory 1 second sleep on the send_keys method however when trying to run my test I'm running into the following:
If I change to the rubygems version, things work just fine for me. Any idea on what I can do to fix this?
Thanks!