The control appearance in a tested application can depend on various factors like a color scheme, application UI style, screen resolution, and so on.
Several approaches may help you deal with image variations of tested controls:
Extending an Image Set of a Control
Applicable to: All cases.
This is the most reliable mechanism. To increase chances of finding the needed control, you can add all possible variants of the control’s appearance to the Image Strip collection in the Image Set editor. See the "Adding Images to the Image Strip" section in the Working With Image Set Editor topic for detailed instructions.
Extending a set of a control’s Images
TestComplete will search for the first representation, then for the second one, and so on, until it finds the matching item or no more items are left.
TestComplete recognizes the control because it is in the Image Set collection.
Adjusting Color Tolerance
Applicable to: Diminish slight differences in color of a control or of its background.
When the desired control looks similar to the baseline copy, but differs in color, you can adjust the Color tolerance recognition parameter in the Image Set editor.
TestComplete recognized the control, because the Color Tolerance parameter has an appropriate value.
Adjusting Pixel Tolerance
Applicable to: Diminish slight differences in a control’s image.
When the needed control slightly differs from the baseline copy (for example, it has the text input cursor, punctuation characters, overlay icons and so on), you can adjust the Pixel tolerance recognition parameter.
TestComplete recognized the control, because the Pixel Tolerance parameter has an appropriate value.