> 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-zh/cao-zuo-zhi-nan/keyboard/select-dropdown.md).

# 选择下拉菜单

选择下拉菜单是指令浏览器自动选择下拉菜单中特定值的操作。

> ⚠️ 重要提示：此操作仅适用于结构标准的 HTML 标签 `<select>`（例如：省/市选择、传统出生年份选择）。
>
> 对于从 `<div>` 或 `<span>` 标签自定义构建的新一代下拉框（如某些现代社交网络的界面），此操作将无效。在这种情况下，您需要通过以下方式处理：使用鼠标点击命令点击下拉框以展开列表 ➔ 再使用第二个鼠标点击命令点击根据该行的 XPath 选择的值。

#### 配置参数：

* XPath：直接指向网页上 `<select>` 标签的标识符路径（例如：`(//select)[1]`）。
* 选择文本：根据屏幕上公开显示的文本填写（例如：`<option value="VN">越南</option>` ➔ 填写值为 `越南`）。

#### 实际示例：注册账户时自动选择国家

当您的脚本运行到注册账户信息的步骤并遇到一个国家选择菜单时。

* 配置方式：
  * XPath：`(//select)[1]`
  * 选择文本：填写澳大利亚
* 结果：系统将立即激活选择框，并将屏幕上显示的值准确安全地更改为“澳大利亚”。


---

# 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-zh/cao-zuo-zhi-nan/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.
