Web Automation: fail gracefully when a screenshot cannot be encoded as base64