> ## 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/2nc_spg9_b4MXqPM/helpcenter/commands/web-automation/images/web-get-page-01.png?fit=max&auto=format&n=2nc_spg9_b4MXqPM&q=85&s=cf90f43a3470406004bd7f08603b43a1" alt="获取已打开的网页对象指令参数面板" width="645" height="516" data-path="helpcenter/commands/web-automation/images/web-get-page-01.png" />

    | 参数        | 说明                                                                                                                                  |
    | --------- | ----------------------------------------------------------------------------------------------------------------------------------- |
    | **浏览器类型** | 支持下拉选择：八爪鱼浏览器、谷歌浏览器、Edge浏览器、360安全浏览器、AdsPower、飞跨浏览器、紫鸟浏览器V6、紫鸟浏览器、易得客浏览器、稳卖AI浏览器（原牛卖浏览器）、Hubstudio、跨境卫士浏览器、站斧浏览器、云登浏览器、比特浏览器、自定义浏览器 |
    | **浏览器路径** | 浏览器类型选择自定义浏览器时，该参数需要填写。选择自定义浏览器的可执行文件路径                                                                                             |
    | **匹配方式**  | 下拉选择：根据标题匹配、根据网址匹配、匹配当前选中的网页                                                                                                        |
    | **匹配文本**  | 参数“匹配方式”选择根据标题匹配或根据网址匹配时需要填写，输入要匹配的文本，支持模糊匹配，支持正则表达式匹配                                                                              |
  </Tab>

  <Tab title="高级">
    <img src="https://mintcdn.com/bazhuayu-rpa-docs/2nc_spg9_b4MXqPM/helpcenter/commands/web-automation/images/web-get-page-02.png?fit=max&auto=format&n=2nc_spg9_b4MXqPM&q=85&s=581c15c305602e1d97a52acb4a10d8fc" alt="获取已打开的网页对象指令高级参数面板" width="660" height="490" data-path="helpcenter/commands/web-automation/images/web-get-page-02.png" />

    | 参数             | 说明                                     |
    | -------------- | -------------------------------------- |
    | **等待网页加载完成**   | 是否需要等待网页加载完成后再进行下一步                    |
    | **加载超时时间（s）**  | 设置网页最大的加载超时时间，单位为秒                     |
    | **加载超时后执行**    | 最大加载超时后，网页页面仍然无法加载完成，则会执行「错误处理」或「停止加载」 |
    | **匹配失败时打开新网页** | 根据网页标题或网址匹配失败时，打开新的指定网页链接              |
    | **网页链接**       | 匹配失败时打开的新网页链接地址                        |
  </Tab>
</Tabs>

## 使用示例

<img src="https://mintcdn.com/bazhuayu-rpa-docs/2nc_spg9_b4MXqPM/helpcenter/commands/web-automation/images/web-get-page-03.png?fit=max&auto=format&n=2nc_spg9_b4MXqPM&q=85&s=3042a3ff46930dc2ad49cbf8dfe8ae04" alt="获取已打开的网页对象使用示例 - 流程搭建" width="1100" height="146" data-path="helpcenter/commands/web-automation/images/web-get-page-03.png" />

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

使用【获取已打开的网页对象】指令获取指定浏览器上已打开的网页

根据匹配方式匹配选择已打开的网页

后续流程可对该网页对象进行操作，如执行【打印日志】获取网页的链接

### 效果展示

根据匹配方式，成功获取已打开的网页对象，可供后续流程使用。

<img src="https://mintcdn.com/bazhuayu-rpa-docs/2nc_spg9_b4MXqPM/helpcenter/commands/web-automation/images/web-get-page-04.png?fit=max&auto=format&n=2nc_spg9_b4MXqPM&q=85&s=8e2691a7435a66491d7c3e9c300466eb" alt="获取已打开的网页对象使用示例 - 效果展示" width="1596" height="127" data-path="helpcenter/commands/web-automation/images/web-get-page-04.png" />

<img src="https://mintcdn.com/bazhuayu-rpa-docs/2nc_spg9_b4MXqPM/helpcenter/commands/web-automation/images/web-get-page-05.png?fit=max&auto=format&n=2nc_spg9_b4MXqPM&q=85&s=e86d96a705d2711f0bc485e89eafcdcb" alt="获取已打开的网页对象使用示例 - 效果展示 2" width="1086" height="160" data-path="helpcenter/commands/web-automation/images/web-get-page-05.png" />

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