> 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/action-shi-yong-zhi-nan/alert/cancel-alert.md).

# Cancel alert

Cancel Alert 动作会自动点击原生系统通知对话框（Alert Dialog）上的取消或关闭按钮。此指令不需要配置参数。

🎥 查看更多操作指南视频：[点击这里](https://youtu.be/3tDWBxDXRfw)。

### ⚠️ 使用注意事项

* 对现代网页界面无效：使用 HTML/CSS 自定义设计的对话框（Modal、Dialog UI）并非系统级 Alert。对于此类弹窗，您必须使用带有相应 XPath 的 Mouse Click。
* 无法处理浏览器内核弹窗：浏览器发出的安全通知（如摄像头、定位权限请求、HTTP Basic Auth 认证等）无法通过此指令进行交互。请在运行脚本前，直接在 GPM Login 中配置好相关权限。
* 执行机制：
  * 使用 Selenium 时：Automate 会按照指令执行准确的 Cancel 动作以拒绝通知。
  * 使用 Puppeteer 时：此指令会在通知出现时立即忽略或取消它（相当于 Dismiss 操作）。

<figure><img src="/files/QsDDdR7PyuSSOjvrjbYy" 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/automate-zh/action-shi-yong-zhi-nan/alert/cancel-alert.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.
