ITV/Coypu — Issue #22: memory leak with HtmlUnit
Author: msokol
Created: 2011-10-21 20:54:01+00:00
State: open

Using the HtmlUnit driver with the selenium-server.jar, after so many tests run (that start a new browser session and end session before next test), an error of "java.lang.OutOfMemoryError: Java heap space" is reported from the selenium server process. In the Coypu.Drivers.Selenium.SeleniumWebDriver.Dispose() method, using Quit() instead of Close() and Dispose() on the RemoteWebDriver seems to resolve the issue. .The memory usage of the java process still seems to climb with each test, but at least the error doesn't occur after it reaches the max memory allocated.