Sha256: af8e46104de448366e3268d2847ee56c9dd4101e7f37851526d904a4bbbc31ad
Contents?: true
Size: 530 Bytes
Versions: 46
Compression:
Stored size: 530 Bytes
Contents
module Watir module Process # Returns the number of windows processes running with the specified name. def self.count name mgmt = WIN32OLE.connect('winmgmts:\\\\.') processes = mgmt.InstancesOf('win32_process') processes.extend Enumerable processes.select{|x| x.name == name}.length end end class IE # Returns the number of IEXPLORE processes currently running. def self.process_count Watir::Process.count 'iexplore.exe' end end end
Version data entries
46 entries across 46 versions & 2 rubygems