> 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/huong-dan-cac-action/keyboard/select-dropdown.md).

# Select dropdown

Select dropdown là hành động ra lệnh cho trình duyệt tự động lựa chọn một giá trị cụ thể trong danh sách menu thả xuống.

🎥 Xem thêm video hướng dẫn: [Tại đây](https://youtu.be/cCTEtuMtz-s).

> ⚠️ Chú ý quan trọng: Hành động này chỉ có tác dụng đối với các thẻ có cấu trúc HTML chuẩn là `<select>` (ví dụ: các menu chọn Tỉnh/Thành phố, chọn Năm sinh truyền thống).
>
> Với các ô dropdown thế hệ mới được dựng tùy biến từ các thẻ `<div>` hoặc `<span>` (như giao diện của một số mạng xã hội hiện đại), hành động này sẽ không có tác dụng. Trong trường hợp đó, bạn cần xử lý bằng cách: Dùng lệnh Mouse click ấn vào ô dropdown để danh sách xổ ra ➔ Dùng tiếp một lệnh Mouse click thứ hai để bấm vào giá trị cần chọn dựa theo XPath của dòng đó.

#### Tham số cấu hình:

* XPath: Đường dẫn mã định danh (XPath) dẫn thẳng vào thẻ `<select>` trên trang web (Ví dụ: `(//select)[1]`.
* Select text: Điền dựa theo phần chữ hiển thị công khai trên màn hình (Ví dụ: `<option value="VN">Việt Nam</option>` ➔ Điền giá trị là `Việt Nam`).

#### Ví dụ thực tế: Tự động chọn Quốc gia khi đăng ký tài khoản

Khi kịch bản của bạn chạy đến bước đăng ký thông tin tài khoản và gặp một ô menu chọn quốc gia.

* Cách cấu hình:
  * XPath: `(//select)[1]`
  * Select text: Điền Australia
* Kết quả: Hệ thống sẽ lập tức kích hoạt ô chọn và chuyển giá trị hiển thị trên màn hình sang "Australia" một cách chính xác và an toàn.

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

<figure><img src="/files/XqlkWInjkjIlgu3jWmHa" 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/huong-dan-cac-action/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.
