Hello,
I am using Watin 2.0 to develop some automated UI tests. I cannot get Watin to close the browser after it has opened it. The Watin.Core.Browser object implements IDisposible but Dispose() does not do the trick. I have also tried using the Close() method.
Most recently I have tried wrapping the IE object instantiation in a Using statement but no luck.
I am testing with IE8
using (IE ie = new IE())
{
ie.GoTo(ApplicationContainer.SummaryUriProvider.URI);
Link furthurReadingLink = ie.Link(Find.ByText("Further Reading"));
furthurReadingLink.Click();
string subTitle = ie.Div("frheader").Element(Find.ByClass("panelsubtitle")).Text;
Assert.AreEqual("Further Reading", subTitle);
}