Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE

When running my DefaultBaseState, it closes my child window every time, can I specify that it be left open?

When running my DefaultBaseState, it closes my child window every time, can I specify that it be left open?

Specifying windows to be left open (non-Web recovery system)

By default, the non-Web recovery system closes all windows in your test application except the main window. To specify which windows, if any, need to be left open (such as a child window that is always open) use the lwLeaveOpen constant.

The lwLeaveOpen constant

When you record and paste the declarations for your application"s main window, the stub of a declaration for the lwLeaveOpen constant is automatically included, as shown in this example:

// The list of windows the recovery system is to leave open
// const lwLeaveOpen = {?}

To complete the declaration for the lwLeaveOpen constant:

  1. Replace the question mark in the comment with the 4Test identifiers of the windows you want to be left open. Separate each identifier with a comma.
  2. Remove the comment characters (the two forward slash characters) at the beginning of the declaration.

For example, the following 4Test code shows how to set the lwLeaveOpen constant so that the recovery system leaves open the window with the 4Test identifier DocumentWindow when it restores the BaseState.

const lwLeaveOpen = {DocumentWindow}

DISCLAIMER:

Some content on Community Tips & Information pages is not officially supported by Micro Focus. Please refer to our Terms of Use for more detail.
Top Contributors
Version history
Revision #:
1 of 1
Last update:
‎2013-02-15 19:17
Updated by:
 
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.