> 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-guide/image-search/wait-to-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.

🎥 See more instructional video: [Here](https://youtu.be/xWu0g35YTGo).

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

#### Real 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 make the script more flexible:

* 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 time on unnecessary waiting.

> 💡 *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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.gpmautomate.com/automate-en/action-guide/image-search/wait-to-image.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
