I alluded to automating my screenshot creation for Octavo's website and App Store page. I finally got round to writing a blog post about how I did it!
https://www.amyworrall.com/blog/automating-mac-app-screenshots
It's a combination of #XCUITest automation, #AppleScript for setting up the Mac, and a bit of scripting to run the tests and post-process the images.