Project translated automatically.
Log in
or
register,
to view the original
Need to fix memory leaks when refreshing the page in selenium on java
Every time the page is refreshed, there is a memory leak. I am using java 17, chromium 125, and selenium 4.21.0. One page refresh consumes about 50 MB of memory. At the start, the program consumes about 200 MB, when reaching 2 GB, java throws Exception in thread "Thread-3" java.lang.OutOfMemoryError: Java heap space. Tried changing the browser version to 125, 110, and 92. Rewrote from selenium to Playwright. Also tried using chrome, chromium, and firefox