I want to simulate opening a web page in java, I know I can do this to actually open the page in my browser on my computer,
String htmlFilePath = "path/to/html/file.html"; // path to your new file
File htmlFile = new File(htmlFilePath);
// open the default web browser for the HTML page
Desktop.getDesktop().browse(htmlFile.toURI());
// if a web browser is the default HTML handler, this might work too
Desktop.getDesktop().open(htmlFile);
But is there a way to simulate it so I don't actually see it open on my computer, but it still evaluates like someone did open the web page.
Or if that is not possible what would be the easiest way to physically open it on my computer and then have a way of getting a callback so that I know when the page has been loaded?
Thanks