Take ios screenshot
        Args:
            - filename(string): optional
        Returns:
            PIL.Image object

def screenshot(self, filename=None):
        '''
        Take ios screenshot
        Args:
            - filename(string): optional
        Returns:
            PIL.Image object
        '''
        image = self.d.screenshot()
        if self.rotation:
            method = getattr(Image, 'ROTATE_{}'.format(self.rotation*90))
            image = image.transpose(method)
        if filename:
            image.save(filename)
        return image