When working with Windows-based applications, UFT One provides a number of advanced options for more accurate testing.
The following information is intended for users with expertise in the Win32 API and the Windows messages model. It expands on the information provided for some of the options described in Windows Applications > Advanced Pane (Options Dialog Box > GUI Testing Tab).
If UFT One does not correctly record an object in your application, you can select this option to force UFT One to enumerate all windows in the system. This means that even when UFT One looks for a window without WS_CHILD style, it enumerates all windows in the system and not only the top-level windows.
You should select this option if there is a window in your application that does not have a WS_CHILD style but does have a parent (not an owner) window.
In general, UFT One records operations on Windows objects based on Windows messages sent by the application. UFT One recognizes the sequence of Windows messages sent to a specific application window by the system, and uses a smart algorithm to determine which operation to record.
In rare cases (where a non-standard message sequence is used), the smart algorithm may record unwanted operations. Select this option if you want to record only the object's basic operation when the selected event occurs. When you select this option, you can also select when to record the operation. If you select On mouse button down, UFT One records the operation performed when a WM_LBUTTONDOWN message is detected; if you select On mouse button up, UFT One records the operation performed when a WM_LBUTTONUP message is detected.
If UFT One does not correctly record keyboard key combinations (for example, CTRL+Y, or ALT+CTRL+HOME), you can try changing the default setting for this option. Following is a brief explanation of each of the options:
Standard. Uses the GetKeyboardState API to detect the keyboard state.
Alternate synchronous. Uses the GetKeyState API to detect the keyboard state.
Alternate asynchronous. Uses the GetAsyncKeyState API to detect the keyboard state.
For details, see the Microsoft documentation.
In most applications, Windows sends a WM_CONTEXTMENU message, WM_ENTERMENULOOP message, WM_INITMENU message, WM_INITMENUPOPUP message, or other initialization message when a user opens a menu. Windows then sends a WM_MENUSELECT message when a user selects a menu item.
The Verify menu initialization event option instructs UFT One to record menu operations only after detecting a menu initialization message. If UFT One does not correctly record menu operations, or if your application does not send initialization messages before sending WM_MENUSELECT messages, try using the Ignore menu initialization event option. This instructs UFT One to always record menu operations.