You can also use software web testing tools like Cypress.
List of Browser Automation Tools
Selenium
Cypress
Headless Chrome
You may be interested in my post “How to set up Headless Chrome on macOS“.
Headless Chrome official website
Phantom.js
Project now discontinued.
You can check alternatives like Headless Chrome.