> 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/navigation/wait-url-changed.md).

# 等待URL更改

等待 URL 更改是指令脚本暂停并持续监控浏览器地址栏，直到当前路径 (URL) 转换为新地址，或者系统将在指定的超时时间 (Timeout) 结束时自动跳过。

#### 配置参数：

* 超时 (s)：系统等待 URL 更改的最大限制时间（以秒为单位）。如果超过此时间而 URL 仍然保持不变，脚本将自动转到下一个操作。

#### 实际示例：等待处理支付网关或验证成功重定向

此操作在您设置第三方登录流时（例如在 Pinterest 上点击 *继续使用 Google*），或在电子商务网站上点击“支付/立即购买”按钮时非常有用：

* 配置方法：在点击激活重定向的按钮后，您插入等待 URL 更改的操作，超时设置为 `30`（30 秒）。
* 操作逻辑：与其使用像 Delay 5-10 秒这样的固定命令（如果网络良好则浪费时间，或者如果网络不佳则可能出现点击失误），系统将主动观察地址栏。只要 Pinterest 成功从登录页面重定向到主页 (`pinterest.com/home`)，脚本将立即继续执行后续交互步骤，而无需等待 30 秒。


---

# 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/navigation/wait-url-changed.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.
