Sha256: cb3964869738f9ae21d2eabe078bc506c2878b2f1311427a0c33667319fca73b
Contents?: true
Size: 933 Bytes
Versions: 3
Compression:
Stored size: 933 Bytes
Contents
module Watir include Watir::Exception # Directory containing the watir.rb file @@dir = File.expand_path(File.dirname(__FILE__)) ATTACHER = Waiter.new # Like regular Ruby "until", except that a TimeOutException is raised # if the timeout is exceeded. Timeout is IE.attach_timeout. def self.until_with_timeout # block ATTACHER.timeout = IE.attach_timeout ATTACHER.wait_until { yield } end @@autoit = nil def self.autoit unless @@autoit begin @@autoit = WIN32OLE.new('AutoItX3.Control') rescue WIN32OLERuntimeError _register('AutoItX3.dll') @@autoit = WIN32OLE.new('AutoItX3.Control') end end @@autoit end def self._register(dll) system("regsvr32.exe /s " + "#{@@dir}/#{dll}".gsub('/', '\\')) end def self._unregister(dll) system("regsvr32.exe /s /u " + "#{@@dir}/#{dll}".gsub('/', '\\')) end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
watir-1.6.6 | lib/watir/module.rb |
watir-1.6.6.rc2 | lib/watir/module.rb |
watir-1.6.6.rc1 | lib/watir/module.rb |