Skip to content

setSubject (Team Notifications, Alerts and Collaboration)

Compatible with:
  • Purpose
  • This command is used to set the 'Subject' for the email being composed.

    It is recommended that the subject line not contain more than 70 characters. Even though Worksoft SaaS can support more characters than that, industry best practices indicate that people prefer shorter subject lines.

    If you want the user-defined variables or system variables within the contents of the string you pass into the 'target' for this command, they must be appropriately enclosed with a '${' on the left and a '}' on the right. During the test execution, Worksoft SaaS will substitute (replace) the variable names, if any, in the subject line with the then-current value of the user-defined or system variable, and string with replaced values will get set as the subject for the email being composed.

    Worksoft SaaS does not impose any restriction on the maximum length of the subject line. However, the email servers may impose a restriction on the length. Some email servers also may implement rules that treat emails that have very long subject lines as 'spam'. So, be careful while setting the subject line for emails that you want to be sent out from within the automated tests in execution.
  • Syntax
  • setSubject(subject)
  • Target
  • subject
  • Value
  • N/A
  • Return Value
  • N/A
 

Feedback and Knowledge Base