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

# 点击窗口元素

## 指令说明

**描述：** 点击窗口中的元素，如按钮、链接或其他任何元素。

## 参数说明

<Tabs>
  <Tab title="常规">
    <img src="https://mintcdn.com/bazhuayu-rpa-docs/W742rR5fGwXr1akA/helpcenter/commands/desktop-automation/images/win_clickelementcommand-01.png?fit=max&auto=format&n=W742rR5fGwXr1akA&q=85&s=a26d9756307dbc28562fc09f4ba62f0b" alt="点击窗口元素指令参数面板" width="646" height="258" data-path="helpcenter/commands/desktop-automation/images/win_clickelementcommand-01.png" />

    | 参数       | 说明                                         |
    | -------- | ------------------------------------------ |
    | **选择元素** | 从窗口元素库中选择一个已捕获的元素或通过「捕获新元素」来捕获新的窗口元素作为操作目标 |
  </Tab>

  <Tab title="高级">
    <img src="https://mintcdn.com/bazhuayu-rpa-docs/W742rR5fGwXr1akA/helpcenter/commands/desktop-automation/images/win_clickelementcommand-02.png?fit=max&auto=format&n=W742rR5fGwXr1akA&q=85&s=0136980105582d1930a1b9347d533251" alt="点击窗口元素指令参数面板" width="639" height="650" data-path="helpcenter/commands/desktop-automation/images/win_clickelementcommand-02.png" />

    | 参数            | 说明                                            |
    | ------------- | --------------------------------------------- |
    | **点击方式**      | 鼠标单击 / 鼠标双击                                   |
    | **鼠标按钮**      | 鼠标左键 / 鼠标右键                                   |
    | **辅助按钮**      | 无 / Alt / Ctrl / Shift                        |
    | **点击位置**      | 元素中心点 / 元素左上角 / 元素左下角 / 元素右上角 / 元素右下角         |
    | **横向偏移量(px)** | 基于点击位置，水平方向的额外偏移量(像素)。正值表示向右偏移，负值表示向左偏移。默认值为0 |
    | **纵向偏移量(px)** | 基于点击位置，垂直方向的额外偏移量(像素)。正值表示向下偏移，负值表示向上偏移。默认值为0 |
    | **执行后延迟(s)**  | 指令执行完成后的等待时间                                  |
    | **等待元素存在(s)** | 等待目标元素存在的超时时间                                 |
  </Tab>
</Tabs>

## 使用示例

<img src="https://mintcdn.com/bazhuayu-rpa-docs/W742rR5fGwXr1akA/helpcenter/commands/desktop-automation/images/win_clickelementcommand-03.png?fit=max&auto=format&n=W742rR5fGwXr1akA&q=85&s=9634814936512280c0c0b0ffdc7b2cf8" alt="点击窗口元素使用示例 - 流程搭建" width="1238" height="100" data-path="helpcenter/commands/desktop-automation/images/win_clickelementcommand-03.png" />

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

使用【点击窗口元素】指令在窗口对象中模拟人工鼠标左键单击浏览器窗口的新建网页按钮。

### 效果展示

成功点击窗口中的目标元素，触发相应的操作。

<img src="https://mintcdn.com/bazhuayu-rpa-docs/W742rR5fGwXr1akA/helpcenter/commands/desktop-automation/images/win_clickelementcommand-04.png?fit=max&auto=format&n=W742rR5fGwXr1akA&q=85&s=a77d4a6a3ab1147e716105f7586eb304" alt="点击窗口元素使用示例 - 效果展示" width="1222" height="156" data-path="helpcenter/commands/desktop-automation/images/win_clickelementcommand-04.png" />

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