What is the purpose of validWords with “". Can you please give an example. I can understand validCharacters with "”
Imagine that you are trying to locate the word “Glisten” in your SUT window and the font is peculiar, the contrast is poor, etc. In those scenarios, “G” is easily mistaken for a “6,” “l” could be a “1” or a vertical line symbol, “s” could be a “5,” and the “e” could be a “3.” But the test step states that “Glisten” will be present in the UI.
Assert ImageFound {text:"Glisten", searchRectangle:mySearchArea, caseSensitive: yes, validWords: "*"}
The code above tells the script to resolve any instances of “it could be this, but it could be that” in favor of finding a match for “Glisten.”
validWords defines whole words allowed as input, and including “” means the empty string is also valid. For example, if validWords = [“”, “cat”, “cab”], then only “cat”, “cab”, or no input at all are accepted, while validCharacters controls which individual letters can be used.
validCharacters lists allowed single letters, like “abc”. validWords lists allowed whole words in quotes, like [“apple”, “banana”]. So “a” is valid by character, but “apple” is only valid if it’s in validWords.