`Set Screenshot Directory` is inconsistent with other `Set ...` keywords

Keywords that set configuration values like Set Selenium Timeout and Set Selenium Implicit Wait simply change the value in library and return the old value to allow restoring it later if needed. Set Screenshot Directory works differently and instead tries to restore the old value automatically. This is problematic for various reasons:

  • This behavior is inconsistent with other Set ... keywords.
  • How restoring actually works isn't adequately documented.
  • There seem to be bugs related to this. I started getting error [ ERROR ] Calling method 'end_test' of listener 'LibraryListener' failed: IndexError: pop from empty list from this code in some SL tests.

Automatically restoring the original value might be a good feature, but it should be used consistently, be documented better, and obviously also fixed. All that is way too much work, and instead we'll remove this functionality from Set Screenshot Directory and change it to work as other Set ... keywords.