WaitForProperty Method

Class

AnyWin.

Action

Waits until the specified property returns the specified value or until the timeout 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_REPLAY_TIMEOUT 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

The following example waits for an operation to complete. The operation is finished when a dialog displays Operation Complete.

dialog.WaitForProperty("caption", "Operation Complete", 10.0)