AnyWin class.
Verifies that the window is active.
window.VerifyActive([bActive][, nTimeout])
Variable | Description |
---|---|
bActive | Optional: TRUE (the default) verifies that the window is active. FALSE verifies that the window is inactive. BOOLEAN. |
nTimeout | Optional: The number of seconds to wait for the window to become active or inactive, depending on the value of bActive. NUMBER. |
Verify(window.IsActive(), expected_state)
VerifyActive raises the exception E_WINDOW_NOT_ACTIVE if the window is not active.
Some other methods will verify that the window they are operating on is active if active window verification is enabled (specified with the OPT_VERIFY_ACTIVE option, which you set with SetOption).
If a timeout is specified with the nTimeout parameter, Silk Test Classic calls VerifyActive() 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.
// choose the Find command TextEditor.Search.Find.Pick() // check whether the Find dialog box appears Find.VerifyActive() // close the Find dialog box Find.Close()