Web Applications and the Recovery System

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

When the recovery system needs to restore the base state of a Web application that uses the Classic Agent, it does the following:

  1. Invokes the default browser if it is not running.
  2. Restores the browser if it is minimized.
  3. Closes any open additional browser instances or message boxes.
  4. Makes sure the browser is active and is not loading a page.
  5. Sets up the browser as required by Silk Test Classic.

    The recovery system performs the next four steps only if the wMainWindow constant is set and points to the home page in your application.

  6. If bDefaultFont is defined and set to TRUE for the home page, sets the fonts.
  7. If BrowserSize is defined and set for the home page, sets the size of the browser window.
  8. If sLocation is defined and set for the home page, loads the page specified by sLocation.
  9. If wMainWindow defines a BaseState method, executes it.
  10. For additional information, see DefaultBaseState and the wMainWindow Object.

To use the recovery system, you must have specified your default browser in the Runtime Options dialog box. If the default browser is not set, the recovery system is disabled. There is one exception to this rule: You can pass a browser specifier as the first argument to a test case. This sets the default browser at runtime. For more information, see BROWSERTYPE Data Type.

The constant wMainWindow must be defined and set to the identifier of the home page in the Web application for the recovery system to restore the browser to your application’s main page. This window must be of class BrowserChild. When you record a test frame, the constant is automatically defined and set appropriately. If you want, you can also define a BaseState method for the window to execute additional code for the base state, for example if the home page has a form, you might want to reset the form in the BaseState method, so that it will be empty at your base state.

On Internet Explorer 7.x and 8.x, when recording a new frame file using Set Recovery System, by default Silk Test Classic does not explicitly state that the parent of the window is a browser. To resolve this issue, add the "parent Browser" line to the frame file.