I need a headless browser, or similar, pure Java library like HtmlUnit that supports JavaScript to reliably render all web page content just as a manual browser would do.
Although HtmlUnit claims to support JavaScript it is very unreliable. I switched from HtmlUnit to ui4j three years ago because ui4j initially did a much better job rendering JavaScript-dependent web page content.
The trouble is ui4j is an unsupported library not subject to updates. It is getting progressively less reliable as websites continue to evolve and it gets increasingly left behind.
My application isn't the traditional one of web crawling and scraping to collate large amounts of user data. I only need to get web page content from a few specific websites. But the content has to be rendered just as it would be in a manual browser which I can then programmatically edit and save using the library to simulate browser events such as clicks.
Can anyone recommend a pure Java library that would let me do this reliably for all websites?