Using the Brower.NavigateTo() method causes a memory leak in IE9.
We have a test which tries to access each of the urls in our web application looking for broken links. We found that this test was consuming all the memory on the machine until it died.
Here is some code that reproduces the problem:
var webAiiSettings = new Settings();
webAiiSettings.ClientReadyTimeout = 120000;
webAiiSettings.AnnotateExecution = true;
webAiiSettings.Web.RecycleBrowser = true;
webAiiSettings.Web.DefaultBrowser = BrowserType.InternetExplorer;
var WebAiiManager = new Manager(webAiiSettings);
var WebAiiBrowser = WebAiiManager.Browsers;
for (int i = 0; i < 100; i++)
Watch the memory of the IE9 browser climb each time it navigates to the website. This does not happen in IE8. Likewise, if I go to IE9 and keep manually hitting the website, the memory doesn't leak.
PS. This is running on a Windows 2008 R2 machine. I don't know if the problem exists on other platforms.