> 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/accept-alert.md).

# Accept alert

Accept alert 操作会自动点击原生系统提示对话框(Alert Dialog)上的"确定"或"确认"按钮。此命令不需要配置参数。

🎥 查看更多教程视频:[点击这里](https://youtu.be/3tDWBxDXRfw)。

### ⚠️ 使用注意事项

* 对现代网页界面无效:使用 HTML/CSS 自行设计的对话框(Modal、Dialog UI)并非系统级 Alert。对于这类对话框,您必须使用带有相应 XPath 的 Mouse click。
* 无法处理浏览器弹窗:来自浏览器的安全通知(如摄像头权限、位置权限、HTTP Basic Auth 验证等)无法通过此命令进行交互。请在运行脚本前先在 GPM Login 中直接配置好相关权限。
* 执行机制:
  * 使用 Selenium 时:Automate 会根据指令准确执行 Accept/Cancel 操作。
  * 使用 Puppeteer 时:对话框出现后会立即自动被接受(Accept)。

<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/accept-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.
