This section explains several wait commands and how to use them appropriately:
Wait until screen is rendered
The Wait until screen is rendered command detects completion by checking for a period of no visible changes on the screen.
Because of this, it may FAIL to detect rendering completion correctly on continuously dynamic web pages, such as:
-
Pages with embedded videos
-
Pages whose banner images rotate every few seconds, etc.
Additionally, if the screen momentarily stops changing during page load, the command may falsely interpret that as rendering being complete and proceed to the next step prematurely.
In such cases, using the “Wait until UI element is visible” or “Wait until UI element exists” command—targeting a UI element that appears only after rendering finishes—can provide more stable operation.
Difference Between “Wait until UI element exists” vs “Wait until UI element is visible”
The Wait until UI element exists command waits until the target UI element is detected in the UI tree. At this point, whether the element is visible or not does not affect the detection.
On the other hand, the Wait until UI element is visible command waits until the target UI element is confirmed to be visibly displayed. Therefore, even if the element exists in the UI tree, it will not be detected if it is in one of the following hidden states:
- display: none;
- visibility: hidden;
- opacity: 0;
For this reason, “Wait until UI element is visible” is generally more stable and recommended, as it ensures the element is truly visible before proceeding.
However, when testing mobile apps on iOS, the “Wait until UI element is visible” command can behave unpredictably. In such cases, please use “Wait until UI element exists” instead.
Command | Content | Stability | Supported on iOS |
Wait until UI element exists |
Wait until the UI element appears in the UI tree |
◯ |
◯ |
Wait until UI element is visible | Wait until the UI element is visible on the screen | ◎ | △ |