Exists returns TRUE if the window exists before the nTimeout seconds elapse, or FALSE if the window does not exist. The window does not have to be active, enabled, or exposed for it to exist. If you specify nTimeout, Exists waits up to the specified number of seconds for the window to exist.
Verify (SaveMessage.Exists (5), TRUE)
Exists should always be part of another statement, so that the value returned by Exists is used.
If the window is not unique, Silk Test Classic raises the E_WINDOW_NOT_UNIQUE exception, unless the OPT_VERIFY_UNIQUE option is set to FALSE.
If you set the OPT_MENU_PICK_BEFORE_GET option to TRUE, you may see menus pop up on the screen when calling Exists on a menu item, even though your code does not explicitly call Pick.
[ ] TextEditor.File.New.Pick () [-] if (SaveMessage.Exists (5)) [ ] SaveMessage.Dismiss ()
When executing a construct like Desktop.PushButton("//PushButton[@caption='OK'").Exists(5), Silk Test Classic initially tries to find a button with the caption "OK". If the button does not exist, Silk Test Classic throws an ObjectNotFoundException and the Exists method is not executed. To avoid this, rewrite the construct to the following:
Desktop.Exists("//PushButton[@caption='OK'", 5)