Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

I get an invalid cast exception when creating an IE instance with WatiN 0.7. Whats wrong?

0
Posted

I get an invalid cast exception when creating an IE instance with WatiN 0.7. Whats wrong?

0

Make sure the thread your code is running in a single threaded apartment (STA) thread. For more information on this subject read this article. WatiN 0.8.0 (and later) will throw a ThreadStateException to help you remind to set the apartmentstate to STA.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123