WaitForProperty Method

Class

AnyWin class.

Action

Waits until the property specified by the propertyName parameter returns the value specified by the propertyValue parameter or until the timeout value is reached.

Availability

This method is supported only in scripts that use the Open Agent and dynamic object recognition.

Syntax

WaitForProperty (propertyName, propertyValue, [timeout])
Variable Description
propertyName Defines which property to find. STRING.
propertyValue Defines which value of the specified property to find. ANYTYPE.
timeout Optional: Number of seconds that Silk Test Classic waits for the property to appear. The agent waits for the property value until the timeout value expires. NUMBER.

Notes

If the property value is not returned before the timeout occurs, an E_WINDOW_NOT_FOUND exception is thrown.

If you do not specify the timeout value, the default timeout value defined by the option OPT_WINDOW_TIMEOUT is used.

Example

Desktop.WaitForProperty("caption", "Desktop", 1.0)