def getAttachmentFromTestStep(self, step_index, file_name):
    '\n        Get the attachment data from a test step\n\n        :param step_index: The test step index\n        :param file_name: The attachment file name\n        :return: list of bytes\n        :rtype: bytes[]\n        '
    url = None
    for attachment in self.testStepResults.TestStepResult[step_index].attachments.TestRunAttachment:
        if (attachment.fileName == file_name):
            url = attachment.url
    if (url is not None):
        resp = requests.get(url, auth=(self._polarion.user, self._polarion.password))
        if resp.ok:
            return resp.content
        else:
            raise Exception(f'Could not download attachment {file_name}')
    else:
        raise Exception(f'Could not find attachment with name {file_name}')
Get the attachment data from a test step

:param step_index: The test step index
:param file_name: The attachment file name
:return: list of bytes
:rtype: bytes[]
def getAttachmentFromTestStep(self, step_index, file_name):
    '\n        Get the attachment data from a test step\n\n        :param step_index: The test step index\n        :param file_name: The attachment file name\n        :return: list of bytes\n        :rtype: bytes[]\n        '
    url = None
    for attachment in self.testStepResults.TestStepResult[step_index].attachments.TestRunAttachment:
        if (attachment.fileName == file_name):
            url = attachment.url
    if (url is not None):
        resp = requests.get(url, auth=(self._polarion.user, self._polarion.password))
        if resp.ok:
            return resp.content
        else:
            raise Exception(f'Could not download attachment {file_name}')
    else:
        raise Exception(f'Could not find attachment with name {file_name}')