Run TestComplete tests on French Locale (OS and Application under Test having French Locale)
- 10 years ago
If it's just a matter of labels being different, you could use conditional name mapping:
http://support.smartbear.com/viewarticle/55608
In your example, you could set the name mapping to be
WndCaption = "Next" OR WndCaption = "Suivant"
- 10 years ago
Hi,
Alternatively to the mentioned conditional NameMapping, you may also consider NameMapping Configurations (http://support.smartbear.com/viewarticle/55608).
One more approach that may be considered but requires extra coding (it was mentioned ages ago so I don't have a link, but the idea remains) is like this:
Assuming that you are using NameMapping (if not or not always, just adopt the idea to the .FindChild()/.FindAll() methods) :
-- Instead of using hardcoded identification parameters (like 'Next' value), make your NameMapping to use the project variables (http://support.smartbear.com/viewarticle/57310/);
-- Store the values of the identification properties ('Next', etc.) in the external (resource) file, database, etc.;
-- Get the required property when needed and assign it to the project variable that is used in the NameMapping;
-- Check if the given namemapped object exists.
The disadvantage of this approach is the required extra coding.
Its advantage is that you can adopt your namemapping 'on the fly'. The guy who originally described this his approach used it to check tested product's localization without any additional efforts. I.e. when he had to test, say, French version of the software, he looked for the identification property value in the French section of the resources file. If the value was not found, the warning was posted to the test log. Then he tried to search for the required object. If the object was not found, he used the value of the identification property from the English section and tried to search for the object again. If the object was found, then he used it, but posted a warning to the log that some object (e.g. Button('Next') ) is not localized.