> 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-en/action-guides/image-search/wait-for-image.md).

# Wait to image

This action helps the tool pause and continuously "watch" the screen until the target image appears (or the timeout expires).

* Effect: It is essential for synchronization, ensuring that the website or application has finished loading data before the tool continues, preventing the script from being rushed, running out of order, or clicking incorrectly when the web has not loaded in time.

> ⚠️ Special note about Scale ratio: The percentage scale of the screen and the resolution of the browser when you take the sample image must be exactly the same as when the script runs in practice. If you set the display to 100% when taking the sample image, but the system profile automatically opens at a scale of 80% or 125% when running, the image scanning algorithm will not be able to recognize the pixel structure of the target, leading to inaccurate results.

#### Real-world example: Waiting for the login button to fully display

When you navigate the browser to a website, due to changing network speeds, the "Login" button may appear immediately or take a few seconds to load. Setting a fixed wait time (Delay) can waste time or still result in errors if the network is too slow. Using Wait to image will help the script handle more flexibly:

* Configuration method: You take a small image of the "Login" button as a sample image, set the maximum wait time and the accuracy for image scanning.
* Result: The script will actively wait, and as soon as the "Login" button appears on the screen, the system will immediately recognize it and move on to the next action without wasting unnecessary wait time.

> 💡 *Detailed parameters such as sample image area configuration (Image), wait time (Timeout), color deviation (Threshold), True color, and output variable (Output) will be analyzed in depth in the guide combining the three actions: Wait to image, Image exists, and Image search.*


---

# 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-en/action-guides/image-search/wait-for-image.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.
