> For the complete documentation index, see [llms.txt](https://docs.gpmautomate.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.gpmautomate.com/automate-en/action-guides/keyboard/select-dropdown.md).

# Select dropdown

The select dropdown is an action that instructs the browser to automatically select a specific value from a dropdown menu.

> ⚠️ Important note: This action only works with elements that have the standard HTML structure of `<select>` (for example: province/city selection menus, traditional birth year selection).
>
> For newer generation dropdowns that are custom-built from `<div>` or `<span>` elements (like the interfaces of some modern social networks), this action will not work. In that case, you need to handle it by: Using the Mouse click command to click on the dropdown to expand the list ➔ Then use a second Mouse click command to select the desired value based on the XPath of that line.

#### Configuration parameters:

* XPath: The identifier path (XPath) that leads directly to the `<select>` element on the webpage (Example: `(//select)[1]`).
* Select text: Fill in based on the publicly displayed text on the screen (Example: `<option value="VN">Việt Nam</option>` ➔ Fill in the value as `Việt Nam`).

#### Real-world example: Automatically select Country when registering an account

When your script reaches the account registration step and encounters a country selection menu.

* Configuration method:
  * XPath: `(//select)[1]`
  * Select text: Fill in Australia
* Result: The system will immediately activate the selection box and change the displayed value on the screen to "Australia" accurately and safely.

<figure><img src="/files/pS7kw9PnlsqGcajxPlOl" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/fVRMcfOTMvrncZkZq4Cd" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.gpmautomate.com/automate-en/action-guides/keyboard/select-dropdown.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
