Text Check on Windows 7 returns invalid characters compared to Windows XP

Text Check on Windows 7 returns invalid characters compared to Windows XP

TestPartner supports a variety of APIs used by applications when capturing text. The main method supported by TestPartner is the Win32 GDI API (i.e. ExtTextOut(), DrawText(), etc.). It also supports Direct2D / DirectWrite (only when used in Internet Explorer), and a few other technology-specific approaches to rendering text.

The purpose of the text capture feature is to be very low level. This allows applications written in technologies not supported by TestPartner to potentially be automated by TestPartner assuming that they render text using something that TestPartner captures. In order to make this support applications written in "unsupported" technologies, this means that TestPartner does not know much (if anything) about the control that is rendering the text beyond where it is on screen.

When a text check is executed, TestPartner finds the window to capture based on the attach name in the check and then captures any text rendered in that window. At a high level this means that TestPartner monitors a number of APIs it knows about for text rendering calls. If any of these calls happen, TestPartner remembers the information specified in the call (the text drawn to the screen, the window it was drawn to, where it was drawn, etc.) and then compares this to what was captured when the text check was originally created. It was originally written with Win32 GDI in mind, but has been expanded to support other technologies over the years.

The net result of this is that TestPartner is very dependent on the text rendered by the OS. This issue is compounded due to the fact that many applications today are not written using the Win32 API directly, but rather using frameworks that are built upon it (or that re-implement everything from the ground up).

In the below screenshots, this is an example of a WinForms application and the text check differences between Windows 7 and XP. The text check returns different results on Windows XP vs Windows 7. This could be due to a number of things, including (but not limited to):

  • - Windows XP could render ComboBoxes and Scroll Bars differently than Windows 7 (maybe the arrow was a bitmap on Windows XP, but is drawn with a specific character in a font on Windows 7?)

  • - WinForms could be implemented differently on Windows XP vs Windows 7

Actual Application

Text Check from Windows 7

Text Check from Windows XP

As a result of this, TestPartner provides the Exclusion Tool as part of the Check Asset functionality which allows you to exclude specific regions on the Check. 

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.
Version history
Revision #:
1 of 1
Last update:
‎2015-04-17 10:59
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.