> ## Documentation Index
> Fetch the complete documentation index at: https://rpa.bazhuayu.com/helpcenter/llms.txt
> Use this file to discover all available pages before exploring further.

# 设置下拉框(web)

## 指令说明

**描述：** 设置下拉框选项，**仅支持 HTML 源码中 select 标签的下拉框**。

## 参数说明

<Tabs>
  <Tab title="常规">
    <img src="https://mintcdn.com/bazhuayu-rpa-docs/_udziDO1jBiOpIxe/helpcenter/commands/web-automation/images/web-select-01.png?fit=max&auto=format&n=_udziDO1jBiOpIxe&q=85&s=b28df713f5570a700756e9e377e91cf0" alt="设置下拉框(web)指令参数面板" width="647" height="478" data-path="helpcenter/commands/web-automation/images/web-select-01.png" />

    | 参数       | 说明                                                |
    | -------- | ------------------------------------------------- |
    | **网页对象** | 选择要操作的目标元素所在的网页对象                                 |
    | **选择元素** | 选择要操作的目标元素，可从已有的元素库中选择，或者通过「捕获新元素」来捕获             |
    | **选择方式** | 选择设置选中项的依据：按选项内容选择（选项的文本内容）、按选项位置选择（选项的顺序位置，从1开始） |
    | **选项内容** | 「按选项内容选择」时出现，输入想要选择的选项内容                          |
    | **选项位置** | 「按选项位置选择」时出现，输入想要选择的选项顺序位置，从1开始                   |
    | **匹配模式** | 「按选项内容选择」时出现，可以选择：模糊匹配 / 精准匹配 / 正则匹配              |
  </Tab>

  <Tab title="高级">
    | 参数            | 说明                |
    | ------------- | ----------------- |
    | **执行后延迟（s）**  | 指令执行完成后的等待时间，建议1s |
    | **等待元素存在（s）** | 等待目标元素存在的超时时间     |
  </Tab>
</Tabs>

## 使用示例

<img src="https://mintcdn.com/bazhuayu-rpa-docs/_udziDO1jBiOpIxe/helpcenter/commands/web-automation/images/web-select-02.png?fit=max&auto=format&n=_udziDO1jBiOpIxe&q=85&s=03afee9be70f0b2338adc07f110c036d" alt="设置下拉框(web)使用示例 - 流程搭建" width="788" height="145" data-path="helpcenter/commands/web-automation/images/web-select-02.png" />

<img src="https://mintcdn.com/bazhuayu-rpa-docs/_udziDO1jBiOpIxe/helpcenter/commands/web-automation/images/web-select-03.png?fit=max&auto=format&n=_udziDO1jBiOpIxe&q=85&s=b6187195c544bb368c7f93a267d1a998" alt="设置下拉框(web)使用示例 - 流程搭建 2" width="644" height="485" data-path="helpcenter/commands/web-automation/images/web-select-03.png" />

**此流程执行逻辑：**

在八爪鱼浏览器中打开网页 [https://deal.ggzy.gov.cn/ds/deal/dealList.jsp](https://deal.ggzy.gov.cn/ds/deal/dealList.jsp)

使用【设置下拉框(web)】指令，选择"省份下拉框"的元素，选择「按选项内容选择」，「选项内容」填入"广东"，「匹配模式」选择"精准匹配"

### 效果展示

网页的下拉框选择结果：

<img src="https://mintcdn.com/bazhuayu-rpa-docs/_udziDO1jBiOpIxe/helpcenter/commands/web-automation/images/web-select-04.png?fit=max&auto=format&n=_udziDO1jBiOpIxe&q=85&s=d08bd1a88d0f5df7a01d8ba35718e0d9" alt="设置下拉框(web)使用示例 - 效果展示" width="1410" height="871" data-path="helpcenter/commands/web-automation/images/web-select-04.png" />

<img src="https://mintcdn.com/bazhuayu-rpa-docs/_udziDO1jBiOpIxe/helpcenter/commands/web-automation/images/web-select-05.png?fit=max&auto=format&n=_udziDO1jBiOpIxe&q=85&s=08597d3f6a163d746187ac83bec63908" alt="设置下拉框(web)使用示例 - 效果展示 2" width="1340" height="131" data-path="helpcenter/commands/web-automation/images/web-select-05.png" />

### 使用 Tips

仅支持 HTML 源码中 select 标签的下拉框，如下图。

<img src="https://mintcdn.com/bazhuayu-rpa-docs/_udziDO1jBiOpIxe/helpcenter/commands/web-automation/images/web-select-06.png?fit=max&auto=format&n=_udziDO1jBiOpIxe&q=85&s=8fa5b5a1055551c2fbb535d6c5e025c3" alt="设置下拉框(web) - 下拉框示例" width="1863" height="882" data-path="helpcenter/commands/web-automation/images/web-select-06.png" />

<Info>
  使用指令过程中遇到问题？前往 [八爪鱼RPA 开发者社区问答板块](https://rpa.bazhuayu.com/community/questions) 提问，获取官方与社区帮助。
</Info>
