Reading Special Characters

I have tried multiple different ways to read a special character (=,!=,<,>,<>) with no luck.

The format of the window is:
Field A = value
Field B = value
Where the "=" is a spring loaded list.

I am trying to select an operand from this list. The list displays the last selected operand on top. I am able to select different operands if the original selection is always the same. But I need to be able to "read" what is the current operand is so that I can move the selection cursor up or down in the list as needed if the operand is different than the original.

I use the basic ReadText command with a small search rectangle and I have added iteratively to see what could work:
ContrastColor: (0,255,0)
ContrastTolerance: 20
Trim: On
TrimColor: (102,102,102)
ValidChararcters: "=,!,>,<"

What else is can I do?


  • Without being able to see the screen you are working against, my guess is that using images will be your best bet. Here are some different approaches:

    Simply capture an image of each symbol, put them all in a collection, search for the collection, and then use the foundImageInfo() function to find out which of the symbols was found. Once you know which image was found, you can use conditional statements to take different actions depending on which image it found.

    If multiples of each image are present on the screen and/or more than one of the symbols is present, you can instead search for each symbol and use everyImageLocation() to determine how many there are/what order they are in on the screen, etc.

    Or, if you need to know which symbol is present in the first line, you can use a searchRectangle with the collection.

    I mention these things just to give you some idea of the information that eggPlant helps you gather about the SUT (System Under Test). You can use this information in a variety of ways within your script, depending on what you are trying to accomplish.

    You can read about the foundImageInfo() function here:

    However, if you are really interested in using the OCR for this part of your test, you can read more about tips and tricks for working with the OCR here:

    Specifically, you might be interested in setting the validCharacters as well as a searchRectangle.
Sign In or Register to comment.