diff --git a/nodejs/docs/api/class-teststep.mdx b/nodejs/docs/api/class-teststep.mdx index 883e5d59efb..55d5e30b099 100644 --- a/nodejs/docs/api/class-teststep.mdx +++ b/nodejs/docs/api/class-teststep.mdx @@ -33,6 +33,35 @@ testStep.titlePath(); ## Properties +### attachments {#test-step-attachments} + +Added in: v1.50testStep.attachments + +The list of files or buffers attached in the step execution through [testInfo.attach()](/api/class-testinfo.mdx#test-info-attach). + +**Usage** + +```js +testStep.attachments +``` + +**Type** +- [Array]<[Object]> + - `name` [string] + + Attachment name. + - `contentType` [string] + + Content type of this attachment to properly present in the report, for example `'application/json'` or `'image/png'`. + - `path` [string] *(optional)* + + Optional path on the filesystem to the attached file. + - `body` [Buffer] *(optional)* + + Optional attachment body used instead of a file. + +--- + ### category {#test-step-category} Added in: v1.10testStep.category