WaitForControl
bool WaitForControl(string ctrl, int timeoutMs)Description
Waits until the specified UI control appears in the application under test.
Polls every 100 ms until the control is found or the timeout expires.
Returns true if the control was found within the timeout, false otherwise.
Parameters
- ctrl - Identifier of the UI control to wait for.
- timeoutMs - Maximum time to wait in milliseconds.
Returns
true if the control appeared within the timeout, false if the timeout expired.
Example
void main()
{
bool found = WaitForControl("DLG_PROGRESS", 5000); // Wait up to 5 seconds
if (found)
{
LeftMouseClick("BTN_OK");
}
}