add time delay when taking screenshots with selenium, sometimes the browser would switch pages before the screenshot could be generated.