diff --git a/src/ImageHorizonLibrary/__init__.py b/src/ImageHorizonLibrary/__init__.py index 200b49d..dd7a702 100644 --- a/src/ImageHorizonLibrary/__init__.py +++ b/src/ImageHorizonLibrary/__init__.py @@ -245,6 +245,16 @@ def _run_on_failure(self): LOGGER.warn('Failed to take a screenshot. ' 'Is Robot Framework running?') + def set_keyword_on_failure(self, keyword_on_failure): + '''Sets keyword to be run, when location-related + keywords fail. + + This keyword might be used to temporarily diable screenshots, then re-enable them later in the test. + + See `library importing` for he usage of keyword_on_failure. + ''' + self.keyword_on_failure = keyword_on_failure + def set_reference_folder(self, reference_folder_path): '''Sets where all reference images are stored.