WatiN in MSTest - ClassCleanup fail

Posted by Pavlo Neyman on Stack Overflow See other posts from Stack Overflow or by Pavlo Neyman
Published on 2010-03-18T09:49:56Z Indexed on 2010/03/18 9:51 UTC
Read the original article Hit count: 969

Filed under:
|
|

In thread WatiN in Visual Studio 2008 - second test method fails (http://stackoverflow.com/questions/679347/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 [http://cid-7a759edaf62c1f79.skydrive.live.com/self.aspx/WatiNExamples/Using%20watin%20with%20visual%20studio%20test.zip]), but when ClassCleanup fires it fails on AttachToIE. As result IEXPLORAR remain running.

What is the problem?

Of course it is possible to just kill the process like this:

// Id of IEXPLORAR
_ie.ProcessID

Process.GetProcessById(_processId).Kill();
this._ie = null;

But I don't really like this way...

Any ideas?

© Stack Overflow or respective owner

Related posts about mstest

Related posts about watin