I am exploring WatIN automation framework driven by NUnit and Nant. I have Apartmentstate set in App.config
<NUnit>
<TestRunner>
<!-- WatiN can only host IE in STA mode -->
<add key="ApartmentState" value="STA"/>
</TestRunner>
</NUnit>
I have also set [TestFixture, RequiresSTA] in test class. This works perfectly fine when i use nunit-console testrunner or Nunit GUI runner.
Using Nunit2 runner in NAnt throws this exception
[nunit2] : [DEBUG] The CurrentThread needs to have it's ApartmentState set to ApartmentState.STA to be able to automate Internet Explorer
How do I workaround this issue?
Thanks Jenga