AutoSetValueAction
The AutoSetValueAction action sets a value that can be used by other actions. This action is typically run during the setup portion of a test case so that other actions in the test case can refer to the value by way of the valueKey parameter.
Parameters
This action accepts the following parameters:- valueKey
- Required: The name of the value. This name is also used by other actions to refer to the new value. If the value key is already in use, the value is updated.
- value
- Optional: The new value that is assigned to the specified value key. If this parameter is not specified, a new value is automatically generated and assigned to the value key.
- object
- Optional: Used with the propertyName parameter to assign a value to the specified value key. This object must match the objectKey parameter of a previous action that created or located the object. If the value parameter is used, the object parameter and the propertyName parameter are ignored.
- propertyName
- The name of the property value in the object parameter that is assigned to the specified value key. The propertyName parameter is only required if the object parameter is specified.
- valuePrefix
- Optional: A prefix that is inserted at the start of the value to customize test data.
Example
The following code snippet shows an example of these parameters when used in the AutoSetValueAction action:
<!-- Get the generated attachment identifier -->
<action name="cmc/automation/AutoSetValueAction">
<param name="valueKey" value="punchoutAttachmentIdentifier"/>
<param name="object" value="punchoutAttachment"/>
<param name="propertyName" value="identifier"/>
</action>