lib/rautomation/adapter/win_ffi/window.rb in rautomation-0.6.1 vs lib/rautomation/adapter/win_ffi/window.rb in rautomation-0.6.2
- old
+ new
@@ -1,25 +1,24 @@
module RAutomation
module Adapter
module WinFfi
+ autoload :UiaDll, File.dirname(__FILE__) + "/ms_uia/uia_dll"
+
class Window
include WaitHelper
include Locators
extend ElementCollections
has_many :controls
class << self
- def initialize_com
- @@oleacc_module_handle = Functions.load_library "oleacc.dll"
- Functions.co_initialize nil
+ def oleacc_module_handle
+ @oleacc_module_handle ||= begin
+ oleacc = Functions.load_library "oleacc.dll"
+ Functions.co_initialize nil
+ oleacc
+ end
end
- end
-
- initialize_com
-
- def oleacc_module_handle
- @@oleacc_module_handle
end
# Locators of the window.
attr_reader :locators