Sha256: 93ad8a3153a7b9ba2b4126c951eb38c655f7ec2b165eee23b70040198b47d01b
Contents?: true
Size: 878 Bytes
Versions: 7
Compression:
Stored size: 878 Bytes
Contents
module Watir include Watir::Exception # Directory containing the watir.rb file @@dir = File.expand_path(File.dirname(__FILE__)) # Like regular Ruby "until", except that a Wait::TimeoutError is raised # if the timeout is exceeded. Timeout is IE.attach_timeout. def self.until_with_timeout # block Wait.until(IE.attach_timeout) { 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
7 entries across 7 versions & 1 rubygems