Can someone do an ELI5 on why headless browsers are useful? I've use them before to make screenshots of webpages, and I have noticed that many NPM packages come (or came) with PhantomJS as a dependency, but I have no idea why one would need that.
Automated integration/regression tests is a pretty big use case. You spin up a copy of your server, point the headless browser at it, run some JavaScript to simulate some user interactions, and verify the page contains the right strings / screenshot doesn't deviate too much from a golden image. I guess the ELI5 way of saying that would be: "Making sure your website still works." People also headless browsers for cont…
Putting the website through user actions in a firefox browser and recording/capturing/documenting the results headlessly. Headless version allows you to go through hundreds of results in the background.