WaitUntilVisible
bool WaitUntilVisible(string ctrl, int timeoutMs)Description
Waits until the specified UI control becomes visible on screen.
Polls every 100 ms until the control is visible (not offscreen) or the timeout expires.
Returns true if the control became visible within the timeout, false otherwise.
This is useful for controls that are hidden or animated into view after a delay.
Parameters
- ctrl - Identifier of the UI control to monitor.
- timeoutMs - Maximum time to wait in milliseconds.
Returns
true if the control became visible within the timeout, false if the timeout expired.
Example
void main()
{
bool visible = WaitUntilVisible("PNL_RESULT", 8000); // Wait up to 8 seconds
if (visible)
{
VerifyEqual(GetText("PNL_RESULT"), "Success");
}
}