VerifyFocus Method (MoveableWin)

Class

MoveableWin.

Action

Verifies that input focus is in the expected control.

Availability

This functionality is supported only if you are using the Classic Agent.

Syntax

window.VerifyFocus(wFocus[, nTimeout])
Variable Description
wFocus The control you expect to have input focus. WINDOW.
nTimeout Optional: The number of seconds to wait for the expected value to be achieved. NUMBER.

Notes

VerifyFocus checks that the expected control that has the input focus in a window. Only controls can have input focus, not top-level windows (such as dialog boxes).

If a timeout is specified with the nTimeout parameter, Silk Test Classic calls VerifyFocus() until the condition is verified or the timeout is reached. The time between checks is the value of the window retry interval Agent option (OPT_WINDOW_RETRY). If the verification fails, an exception is thrown.

Example

MyDialog.TextField1.VerifyFocus(MyDialog.OK)