Languages other than English be specified for the text recognition mechanism

Modify the supportedLanguages value for the text recognition registry key

Note:
QuickTest Professional 9.2 introduced a new text recognition mechanism. The information provided here applies to QuickTest Professional 9.2 or higher. This solution is not available for earlier versions of QuickTest Professional.

To indicate which language dictionaries QuickTest Professional’s text recognition mechanism should use, update the supported language list in the registry.

1. Open the registry editor.
2. Navigate to HKEY_CURRENT_USER\SOFTWARE\Mercury Interactive\QuickTest Professional\MicTest\OcrEngine. 3. Right-click on the supportedLanguages value, and select “Modify.”
4. Set the value data to the language or languages to be supported. Use a comma to separate the languages.

Example:
English,German,Spanish,French

Note:
Combined hieroglyphic languages (CJK – Chinese, Japanese, or Korean) and non-hieroglyphic languages are not supported. For example: English,Japanese

5. Click .
6. Restart QuickTest Professional.

Advertisements

Text recognition be set for both hieroglyphic and non-hieroglyphic languages simultaneously

Combined hieroglyphic languages and non-hieroglyphic languages are not supported

Note : QuickTest Professional 9.2 introduced a new text recognition mechanism. The information provided here applies to QuickTest Professional 9.2 or higher. This solution is not available for earlier versions of QuickTest Professional.

The text recognition mechanism will allow you to specify the language dictionaries that should be used, however it does not support the combination of hieroglyphic languages and non-hieroglyphic languages.

Example:
English,Japanese

You will need to configure the text recognition mechanism to recognize these languages in different run sessions. QuickTest Professional will need to be shut down, configured, and re-launched in order for the changes to take effect.

Text on small objects or in a small text area is not captured or is captured incorrectly

Sometimes, when QuickTest Professional (QTP) 9.2 attempts to capture text from a small object or in a small text area, it is not captured, or is captured incorrectly.

Modify the maxHforSingleBlock and maxWforSingleBlock values for the text recognition registry key

Note: Solution is not available for earlier versions of QuickTest Professional, only versions 9.2 and above

Specifying the maximum text area size in pixels may help improve text recognition. This causes the OCR mechanism to focus on a specific area and treat it as a single text block (and not as multiple text blocks, as it would normally do).

To specify the maximum text area size for QuickTest Professional’s OCR text recognition, update the OcrEngine registry key.

1. Open the registry editor.
2. Navigate to HKEY_CURRENT_USER\SOFTWARE\Mercury Interactive\QuickTest Professional\MicTest\OcrEngine. 3. Right-click on the maxHforSingleBlock value, and select “Modify.”
4. Set the value data to the desired height of the text block in pixels, for example, 29.

Tip: Is possible to use QuickTest Professional’s Object Spy to find the height and width of the object.

5. Click .
6. Right-click on the maxWforSingleBlock value, and select “Modify.”
7. Set the value data to the desired width of the text block in pixels, for example, 29.

Tip: Use QuickTest Professional’s Object Spy to find the height and width of the object.

8. Click .
9. Restart QuickTest Professional.

Modify both value entries to instruct the OCR mechanism to treat the object as a single text block.

Note: The default for both values is zero (0), which indicates multiple text blocks.

Retrieve the runtime property of an object

Use the GetROProperty method. This method returns the current value of a property for the object in the application.

GetROProperty(Property [, in_PropData])

Property – Property to retrieve from the object.
in_PropData – This parameter is not in use.

Example:
‘ The following example uses the GetROProperty method to retrieve ‘ the title property of a Static object.
title = Browser(“index”).Dialog(“Internet Options”).Static(“You can change”).GetROProperty(“title”)

‘ The following example uses the GetROProperty method to retrieve the ‘ x coordinate of the “Test” window.
x = Window(“Test”).GetROProperty (“x”)

List of the default and available properties for various objects

Refer to the Object Identification utility and the Object Model Reference

You can find a list of the available Test Object properties for objects in the Object Model Reference.

QuickTest Professional 9.x
1. Go to Help -> QuickTest Professional Help.
2. Go to Object Model Reference -> -> -> Properties. 3. Select the Identification Properties link.

Example:
Object Model Reference -> Java -> JavaButton Object -> Properties -> JavaButton Identification Properties

QuickTest Professional 8.0
1. Go to Help -> QuickTest Professional Help.
2. Go to Object Model Reference -> -> Test Object Properties. 3. Select the link for the desired Test Object.

Example:
Object Model Reference -> Visual Basic -> Visual Basic Test Object Properties -> VbList Test Object Properties

QuickTest Professional 6.5
1. Go to Help -> QuickTest Professional Help.
2. Go to Object Model Reference -> -> 3. Select the Test Object Properties link.

Example:
Object Model Reference -> Visual Basic -> VbList Object -> VbList Test Object Properties

For the default properties used to identify objects, refer to the Object Identification tool. 1. Go to Tools -> Object Identification.
2. In the “Environment” drop-down, select the appropriate option.

Example:
Standard Windows for Dialog or Window objects.
Web for WebEdit or Browser objects.

3. Select the desired Test Object Class from the left column. The tables to the right will be populated with the values.

The values listed in the Mandatory table are always used (if they have a value) to identify objects of the selected class. The assistive properties are used if the mandatory properties do not uniquely identify the object. You can use the Add/Remove options to customize the mandatory and assistive property lists.

To reset to the defaults, click . This will return the settings for all objects back to the default values, not just the class that is highlighted.

Text recognition operations on Windows Vista, 7 or 2008 are not always reliable

On Windows Vista, 7 or 2008 operating system (32bits or 64bits), QuickTest Professional (QTP) 9.X or higher version’s text recognition features (such as text checkpoints and output values, GetVisibleText and GetTextLocation test object methods, and TextUtil.GetText and TextUtil.GetTextLocation reserved object methods) are limited and are not always reliable.

Note: By design, text recognition on Windows Vista, Windows 7 and Windows 2008 can only use/work-with OCR setting instead of Windows API, which may result on capture text being less accurate or reliable as on older operating systems. Below are alternatives/suggestions to try improving the OCR results

* Minimize searching area. Setup the seach of text to smaller range/area, for example GetVisibleText method, includes parameters “left”, “top”, “right” and “bottom” to define the search area.
Note: If the Left, Top, Right, and Bottom arguments are not specified, the method returns all of the text within the visible part of the specified object. * Applying the Classic Windows theme:
1. Right click on the your desktop and select “Personalize.” 2. Click on the Theme link to bring up the Theme Settings dialog. 3. Under Theme, select “Windows Classic.”
* The larger the text, the better the text recognition. Either setup the operating system to display character size as bigger, or make character size bigger in the application. Check the operating system’s settings to increase font or DPI size, or the application’s developers for text only on the application.
* Ensure QuickTest Professional is using the OCR only mode for text recognition.
* For QTP 10 or higher, try setting up “Single text block mode” in the General > Text Recognition pane of the Options dialog box.

Difference between the Test Batch Runner and Automation Object Model

The Test Batch Runner is a dedicated utility:
* Found under Start > Programs > QuickTest Professional / Unified Functional Testing > Tools > Test Batch Runner. * Allows to run several scripts together (in a “batch”)

The Automation Object Model (AOM) is the QuickTest Professional’s API (Application Programming Interface), a feature (not an utility).