def wrapper(self, *args): "Wrapper." try: return fun(self, *args) except Exception as exception: LOGGER.error(exception) file_path = (environment.LOG_PATH + self.__class__.__name__ + "." + self._driver.title) unique_file_path = file_ops.get_unique_postfix(file_path, ".png") self._driver.get_screenshot_as_file(unique_file_path) raise
def wrapper(self, *args): try: return fun(self, *args) except Exception as e: logger.error(e) file_path = environment.LOG_PATH\ + self.__class__.__name__\ + "."\ + self._driver.title unique_file_path = file_ops.get_unique_postfix(file_path, ".png") self._driver.get_screenshot_as_file(unique_file_path) raise