def on_exception(self, exception, driver): # TODO: Put exception images with where the build is running screenshot_name = "phantomjs_exception_{}.png".format( logger.generate_timestamp()) driver.get_screenshot_as_file(screenshot_name) LOGGER.error("Exception screenshot saved as '%s'" % screenshot_name)
def generate_build_string(prefix=None): build = logger.generate_timestamp() if prefix: build = prefix + '_' + build return build