Sha256: 12481dff3b25342d0e5f487f8505e6db27820fb1da61d84ba3e033c197471c5d
Contents?: true
Size: 722 Bytes
Versions: 41
Compression:
Stored size: 722 Bytes
Contents
# based on http://svn.instiki.org/instiki/trunk/test/watir/e2e.rb # and http://rubyforge.org/pipermail/wtr-general/2005-November/004108.html require 'watir/ie-process' class IEProcess < Watir::IE::Process def stop right_to_terminate_process = 1 handle = Win32API.new('kernel32.dll', 'OpenProcess', 'lil', 'l'). call(right_to_terminate_process, 0, @process_id) Win32API.new('kernel32.dll', 'TerminateProcess', 'll', 'l').call(handle, 0) end end module Watir class IE def process_id @process_id ||= IEProcess.process_id_from_hwnd @ie.hwnd end attr_writer :process_id def kill iep = IEProcess.new process_id iep.stop end end end
Version data entries
41 entries across 41 versions & 1 rubygems
Version | Path |
---|---|
watir-1.5.5 | watir/contrib/ie-new-process.rb |