CloseExistingFireFoxInstances ignored?
Brought to you by:
jvmenen
There seems to be a bug when creating a new FireFox instance, when firefox.exe is already running. Even setting CloseExistingFireFoxInstances to true doesn't help. Please see the code below...
{
Process proc = Process.Start("firefox.exe");
proc.WaitForInputIdle(5000);
proc.Refresh();
Settings.CloseExistingFireFoxInstances = false;
// This line throws WatiN.Core.Native.Mozilla.FireFoxException with message "Existing instances of FireFox detected."
FireFox browser = new FireFox();
}
This was run against version 2.1.0.1196 of WatiN.Core.dll
I've found a workaround for this. Please see the code below...
{
Process proc = Process.Start("firefox.exe", "about:blank -jssh");
proc.WaitForInputIdle(5000);
proc.Refresh();
}