Forum Discussion
AlexeyK
13 years agoSmartBear Alumni (Retired)
Aurélien,
If you use language-specific text properties for object recognition (like wText or WndCaption), then you have to specify text in the appropriate language. To minimize possible editing, you can try using text properties that are not language-specific (like WndClass, it's always in English), or use non-text properties (like ChildCount, Height, ScreenLeft and others). Numbers are the same in all the languages :-).
At first it correctly finds it (because the NameMapping is in French), but it finds it even when the NameMapping is in English. And after it proposes me to change English NameMapping because the property wText has changed. So I don't understand how I am suppose to this? Shouldn't it fail when searching for "Edit" object since the property is not the one expected?
This happened because you use the same recognition settings both in English and in French name mapping configurations. Take a look at the attached screenshots (img1 and img2). If you used different recognition settings, TestComplete would work as you expected.
I figured out that I have to edit the wText value as a constant. Is there not another way?
If you use language-specific text properties for object recognition (like wText or WndCaption), then you have to specify text in the appropriate language. To minimize possible editing, you can try using text properties that are not language-specific (like WndClass, it's always in English), or use non-text properties (like ChildCount, Height, ScreenLeft and others). Numbers are the same in all the languages :-).