Skip to content

setAttachmentFile (Team Notifications, Alerts and Collaboration)

Compatible with:
  • Purpose
  • This command is used to set a 'File' as an attachment to the email.  

    The file has to be within the same project the test script belongs to.  

    The input to the 'target' field of this email is the name of the 'file'. 'Status' of the file must not be specified along with the file name because only 'active' files can be attached (inactive ones cannot be).

    Worksoft SaaS does not impose any restriction on the number of attachments, including 'files', that can get attached to the email body (name). But, the recipient's email server may impose restrictions on the number of email attachments and/or the total file size of attachments. Many email servers restrict email attachments that exceed the total byte size of 40 MB.

    The name of the file attachments (files) will remain the same as the names of the file(s) in the Worksoft SaaS.  

    Please note that if data files, files and screenshots are attached to the email body, then the order in which the attachments will appear in the email that is composed is as follows:
    • 'Data Files' first, 'Files' next followed by 'Screenshots'
    • Within a file of a particular type (data file or file or screenshot), the files will appear in the order they are attached.

    If the 'file' passed as input to the 'target' field does not exist in the project, during execution of an automated test, this instruction will fail with a message: "The 'file' passed as input into the 'target' field of this test instruction does not exist in your project."
  • Syntax
  • setAttachmentFile(Filename)
  • Target
  • Filename
  • Value
  • N/A
  • Return Value
  • N/A



 

Feedback and Knowledge Base