> ## Documentation Index
> Fetch the complete documentation index at: https://momentic.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# module

> Invoke a reusable module of steps.

Module paths resolve relative to the YAML file that contains the step. Inputs
override the module's `defaultParameters` for this invocation. Inputs accept
three shapes: raw JavaScript expressions (the default), `{ string: ... }` for
explicit literals, and `{ javascript: ... }` for explicit expressions.

## Parameters

| Parameter | Type                                                     | Required | Description                                                           |
| --------- | -------------------------------------------------------- | -------- | --------------------------------------------------------------------- |
| `path`    | `string`                                                 | Yes      | Path to the `.module.yaml` file, relative to the current file.        |
| `inputs`  | `Record<string, string \| { string } \| { javascript }>` | No       | Inputs to pass to the module's parameters.                            |
| `saveAs`  | `string`                                                 | No       | Name of the variable to write this step's return value to.            |
| `retries` | `number`                                                 | No       | Number of times to retry the step on failure before failing the test. |
| `skipped` | `boolean`                                                | No       | Skip this step at execution time.                                     |

## Shorthand

Module path as a single string. Use when the module needs no inputs.

```yaml theme={null}
- module: ./create-local-mobile-test.module.yaml
```

## Examples

```yaml theme={null}
- module:
    inputs:
      url:
        javascript: "'https://www.ycombinator.com'"
    path: ../modules/create-ci-test-with-url.module.yaml
```

```yaml theme={null}
- module:
    inputs:
      TEST_NAME:
        javascript: env.CREATED_TEST_NAME
      NEW_TEST_BASE_URL:
        string: https://storage.googleapis.com/staging-test-sites/neverssl.html
      NEW_TEST_NAME:
        javascript: env.CREATED_TEST_NAME
    path: ./fill-new-browser-test-form.module.yaml
```

```yaml theme={null}
- module:
    inputs:
      STEP_TYPE:
        string: ELEMENT CHECK
    path: ./add-step-to-end.module.yaml
```

## Notes

Module paths must not start with `file://`. Use a plain relative path. Inputs
accept three shapes: a raw value (interpreted as a JavaScript expression, e.g.
`env.QA_EMAIL`), `{ string: "literal" }`, or `{ javascript: "expr" }`.

## Related

* [Modules](/core-concepts/modules)
* [Variables](/core-concepts/variables)
* [Test format](/core-concepts/test-format)
