Skip to main content
correct spelling
Source Link
user246
user246

This is a common issue that comes up in automated test design.

Since textual strings in forms are likely to change, and if the purpose is functional validation of 'text' for whatever langauge being present then I would recommend using the control ID as you have done.

Although it is possible (and Siva explains one possible way), in my experience validating the content of a string in automation doesn't seem like a worthy pursuit IMHO and is a recipe for constant maintenance and numerous false positives.

If tsetingtesting the content of a string is important, then you can always call an API to detect the current OS UI locale/language in your test (rather than passing an arg as a param), and then using either fuzzy match, or taking a sample of the string a comparing the char code points against the range code point values for chars for that given locale/language.

This is a common issue that comes up in automated test design.

Since textual strings in forms are likely to change, and if the purpose is functional validation of 'text' for whatever langauge being present then I would recommend using the control ID as you have done.

Although it is possible (and Siva explains one possible way), in my experience validating the content of a string in automation doesn't seem like a worthy pursuit IMHO and is a recipe for constant maintenance and numerous false positives.

If tseting the content of a string is important, then you can always call an API to detect the current OS UI locale/language in your test (rather than passing an arg as a param), and then using either fuzzy match, or taking a sample of the string a comparing the char code points against the range code point values for chars for that given locale/language.

This is a common issue that comes up in automated test design.

Since textual strings in forms are likely to change, and if the purpose is functional validation of 'text' for whatever langauge being present then I would recommend using the control ID as you have done.

Although it is possible (and Siva explains one possible way), in my experience validating the content of a string in automation doesn't seem like a worthy pursuit IMHO and is a recipe for constant maintenance and numerous false positives.

If testing the content of a string is important, then you can always call an API to detect the current OS UI locale/language in your test (rather than passing an arg as a param), and then using either fuzzy match, or taking a sample of the string a comparing the char code points against the range code point values for chars for that given locale/language.

Source Link
Bj Rollison
  • 5.2k
  • 17
  • 23

This is a common issue that comes up in automated test design.

Since textual strings in forms are likely to change, and if the purpose is functional validation of 'text' for whatever langauge being present then I would recommend using the control ID as you have done.

Although it is possible (and Siva explains one possible way), in my experience validating the content of a string in automation doesn't seem like a worthy pursuit IMHO and is a recipe for constant maintenance and numerous false positives.

If tseting the content of a string is important, then you can always call an API to detect the current OS UI locale/language in your test (rather than passing an arg as a param), and then using either fuzzy match, or taking a sample of the string a comparing the char code points against the range code point values for chars for that given locale/language.