I would like to know how I can prevent Internet Explorer from firing up every time I run my console application which uses WatiN for testing live sites.
When I run m
browser.ShowWindow(WatiN.Core.Native.Windows.NativeMethods.WindowShowStyle.Hide);
Try:
using (IE ie = new IE("http://somesite.com/"))
{
ie.ShowWindow(NativeMethods.WindowShowStyle.Hide);
....
}
The IE class by deafult uses some built in settings for a few features. One of which is MakeNewIeInstanveVisible. By default it is set to true. So you can change the WatiN Settings before you create a new instance of the IE class.
Settings.Instance.MakeNewIeInstanceVisible = false;