def get_screenshot_as_file(self, filename):
        """
        Gets the screenshot of the current window. Returns False if there is
           any IOError, else returns True. Use full paths in your filename.

        :Args:
         - filename: The full path you wish to save your screenshot to.

        :Usage:
            driver.get_screenshot_as_file('/Screenshots/foo.png')
        """
        png = self.get_screenshot_as_png()
        try:
            with open(filename, 'wb') as f:
                f.write(png)
        except __HOLE__:
            return False
        finally:
            del png
        return True
dataset/ETHPy150Open apiad/sublime-browser-integration/selenium/webdriver/remote/webdriver.py/WebDriver.get_screenshot_as_file