waitForObject
Object waitForObject(objectOrName)
Object waitForObject(objectOrName, timeoutMSec)
Waits until the objectOrName
object is accessible (i.e., it exists and is visible and enabled). It returns a reference to the object if successful or raises a (catchable) LookupError
exception on failure, i.e., if the function times out. The function waits for the time defined by the testSettings.waitForObjectTimeout property or if the optional timeoutMSec
parameter is used, that many milliseconds. This function is useful if you want to synchronize your script execution.
The given name can also be a native script dictionary (resp. hash) value.
This function is only suitable for objects that are (or become) visible; for non-visible objects consider using the Object waitForObjectExists(name) function instead. And if you only want to know if an object exists, use the Boolean object.exists(objectName) function.
Additional processing can be done on waited-for objects in a user-defined callback function. See waitUntilObjectReady(anObject) for more details.
© 2024 The Qt Company Ltd.
Documentation contributions included herein are the copyrights of
their respective owners.
The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.
Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property
of their respective owners.