def make_screenshot(self, screenshot_name=None):
        if not screenshot_name:
            # Without name (and possibly path) we cannot make screenshot. Don't
            # know where to store it.
            if not self.screenshot_path:
                return
            screenshot_name = self.id()

        # Close unexpected alerts (it's blocking and then tests fails completely).
        self.driver.close_alert(ignore_exception=True)

        self.driver.get_screenshot_as_file('%s/%s.png' % (self.screenshot_path, screenshot_name))
Save screenshot to :py:attr:`.screenshot_path` with given name
dataset/ETHPy150Open horejsek/python-webdriverwrapper/webdriverwrapper/unittest/testcase.py/WebdriverTestCase.make_screenshot