Window is not enabled

Problem

You run a script and get the following error: Error: Window 'name' is not enabled.

This error means that the object that Silk Test Classic is trying to act on is not enabled. This message applies to controls inside top-level windows (such as PushButton and CheckBox).

Solution

You can correct this problem in one of two ways.

  • If the object is indeed disabled, edit the script and add the actions that will enable the object.

  • If the object is in fact enabled and you want the script to perform the action, tell Silk Test Classic not to verify that a window is enabled:

To turn off the verification globally, uncheck the Verify that windows are enabled option on the Verification tab in the Agent Options dialog box (Options > Agent).

To turn off the option in your script on a case-by-case basis, add the following statement to the script, just before the line causing the error: Agent.SetOption(OPT_VERIFY_ENABLED, FALSE)

Then add the following line just after the line causing the error: Agent.SetOption(OPT_VERIFY_ENABLED, TRUE).

This means Silk Test Classic will execute the action regardless of whether the window is enabled.