> ## 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.

# select

> Pick an option from a `<select>` dropdown.

Requires exactly one of `label`, `value`, or `index` to identify the option to
choose.

## Parameters

| Parameter | Type                 | Required | Description                                                                                     |
| --------- | -------------------- | -------- | ----------------------------------------------------------------------------------------------- |
| `from`    | `string`             | No       | Description of the `<select>` element.                                                          |
| `css`     | `string`             | No       | CSS selector for the target. Use instead of the description key.                                |
| `coords`  | `string \| { x, y }` | No       | Absolute viewport coordinates. Either an `x, y` string (e.g. `120, 40`) or a `{ x, y }` object. |
| `x`       | `number \| string`   | No       | X coordinate. Must be provided together with `y`.                                               |
| `y`       | `number \| string`   | No       | Y coordinate. Must be provided together with `x`.                                               |
| `force`   | `boolean`            | No       | Force the action even when the element is not actionable.                                       |
| `iframe`  | `string`             | No       | URL or URL pattern of the iframe that contains the target element.                              |
| `label`   | `string`             | No       | Visible label of the option to choose.                                                          |
| `value`   | `string`             | No       | `value` attribute of the option to choose.                                                      |
| `index`   | `number \| string`   | No       | Zero-based index of the option to choose.                                                       |
| `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.                                                               |

## Examples

```yaml theme={null}
- select:
    from: The select element labeled "Dropdown:"
    label: "{{ env.OPTION_LABEL }}"
```

```yaml theme={null}
- select:
    from: The select element "Dropdown:"
    value: "{{ env.OPTION_VALUE }}"
```

```yaml theme={null}
- select:
    from: The "Dropdown:" select element
    index: "{{ env.OPTION_INDEX }}"
```

## Related

* [Finding elements](/core-concepts/finding-elements)
* [Dropdowns](/guides/page-interactions/dropdowns)
* [Test format](/core-concepts/test-format)
