I'm writing a script to take a screenshot of a URL. I've tried using phantomjs, but Twitter is saying that the browser is no longer supported - so I'm rewriting my code to use headless chrome. The only problem is that Twitter is still gathering data when the page is "done loading" so chrome fires off the screenshot then... leaving me with a png of a loading bird. I've tried doing a virtual time budget but, from what I've read, that only applies to waiting until ajax requests are completed.
And example of a command I've run is this:
chrome --screenshot="test.png" --headless --disable-gpu --incognito --enable-viewport --window-size=360,740 --virtual-time-budget=3000 https://twitter.com/StackOverflow/status/1332339666566131718
Running this through headless Chrome often yeilds and image like this:
Is there any way for me to get headless chrome to wait x number of ms until it executes the screenshot command?
