I would urge you to try nightmare[1], its a web scraper that uses electron as a headless browser, and they have a plugin called daydream[2] that records your webpage actions and convert it into a nightmare script. You have to do a couple of retries, but it does work.
[1] https://github.com/segmentio/nightmare [2] https://github.com/segmentio/daydream