In thread WatiN in Visual Studio 2008 - second test method fails there is a good solution with IEStaticInstanceHelper (original answer Reusing an IE instance in VS test, sources), but when ClassCleanup fires it fails on AttachToIE. As result IEXPLORAR remain running.
问题是什么?
当然,有可能仅仅杀害这一进程:
// Id of IEXPLORAR
_ie.ProcessID
Process.GetProcessById(_processId).Kill();
this._ie = null;
但我并不真的喜欢这样做......
任何想法?