'Sets the directory where screenshots are saved.
It is possible to use ``/`` as a path separator in all operating
systems. Path to the old directory is returned.
The directory can also be set in `importing`.'

def set_screenshot_directory(self, path):

    path = self._norm_path(path)
    if (not os.path.isdir(path)):
        raise RuntimeError(("Directory    '%s'    does    not    exist." % path))
    old = self._screenshot_dir
    self._given_screenshot_dir = path
    return old
