Screen text command
Returns the text that appears on the screen of the device (but does not select the text). The retrieved screen text can be stored in a defined String variable or to a location in the Perfecto Repository (see key parameter) and then used with the string compare and string attribute checkpoints.
Parameters
Name | Type | Possible values | Description |
---|---|---|---|
Device ID* |
Device |
|
The device for this command. By default, this is the device under test (DUT). |
Screen context |
String |
all | body |
Defines the screen region where to retrieve the text. |
Result variable |
String |
The variable to receive the retrieved value. |
|
Analysis source |
String |
Primary | Native | Camera | Auto |
The source for retrieving the screen content.
|
Report |
String |
All | All on error | Screenshot | Screenshot on error | Text | None |
The value to display in the report.
Consider reducing the resolution in very long scripts that result in large report files. |
OCR - Profile |
String |
Default | Document Conversion Accuracy | Document Conversion Speed | Document Archiving Accuracy | Document Archiving Speed | Book Archiving Accuracy | Book Archiving Speed | Text Extraction Accuracy | Text Extraction Speed | Field Level Recognition | Barcode Recognition |
Use when text cannot be found on the device screen. Try all the profiles with the word accuracy. Per profile, try changing the DPI (96 or 300 or 120). |
OCR - Analysis mode |
String |
Full | Automatic | Manual |
The image analysis mode. The device screen may contain text and images.
This parameter is not relevant when using native screen source. |
OCR - Inverted text |
String |
Any | Yes | No |
The text appearance, likely to appear in inverted colors (dark text on light background). Use only if Analysis mode is set to Manual.
|
Visual relation direction |
String |
Left | Right | Above | Below | Left-Above | Left-Below | Right-Above | Right-Below | Inside |
The direction of the related region, stored in memory from the last found needle, in relation to the searched needle. For more information, see the Visual Relations series.
|
Visual relation inline |
String |
Horizontal | Vertical |
The search area is in line with the related region, stored in memory from the last found needle. For more information, see the Visual Relations series.
|
Lines |
Number |
The number of text lines to be retrieved from the edit field. |
|
Report image resolution |
String |
High | Medium | Low |
The image resolution. Consider reducing the resolution in very long scripts that result in large report files. |
Repository key |
String |
The full repository path, including directory and file name, where to save the screen text. When using commands that utilize files from the repository, the paths to the files are specified as repository keys. A repository key consists of the subarea and the path to the file. For example, to specify a file called myImage.jpg stored in the images folder located in the PRIVATE subarea, specify the key as The text will always be available in the report. |
|
OCR - Languages |
String |
English | Spanish | Japanese | German | French | Dutch | Italian | Chinese | Russian | Portuguese |
The OCR language to use. It is possible to select multiple languages. For languages that do not appear in the drop down menu, contact Perfecto Support to enable them. This parameter is not relevant when using native screen source. |
OCR - Policy |
String |
Auto | Accuracy | Performance |
The text recognition accuracy policy. Selecting the Accuracy value will increase the operation time.
This parameter is not relevant when using native screen source. |
Haystack top |
String |
The top value of the screen area where to search for the label. Values can be in pixels or in percentage of screen width (0-100). For percentage, use the % sign. Example: 20% Default is to search the entire screen. Consider using the percentage value because it does not rely on the screen resolution. |
|
Haystack height |
String |
The height value of the screen area where to search for the label. Values can be in pixels or in percentage of screen width (0-100). For percentage, use the % sign. Example: 20% Default is to search the entire screen. Consider using the percentage value because it does not rely on the screen resolution. |
|
Haystack left |
String |
The left value of the screen area where to search for the label. Values can be in pixels or in percentage of screen width (0-100). For percentage, use the % sign. Example: 20% Default is to search the entire screen. Consider using the percentage value because it does not rely on the screen resolution. |
|
Haystack width |
String |
The width value of the screen area where to search for the label. Values can be in pixels or in percentage of screen width (0-100). For percentage, use the % sign. Example: 20% Default is to search the entire screen. Consider using the percentage value because it does not rely on the screen resolution. |
|
Use cache |
String |
Use | No Use |
Indicates whether the text recognition application should use a cached picture of the screen if available (this value should not be changed by the user, under normal circumstances). |
Grid label |
String |
The column name to be used for grid view in the report. Selecting this parameter creates the grid report. |
|
Comment |
String |
Adds a comment to the script. |
|
On-fail Result* |
Condition |
Ignore | Break | Continue | Abort | Catch |
The behavior when the command fails. |
* Mandatory parameter