I’m trying to dynamically test if a text is present on a website so that I can verify a link leads to the correct page. So I get the text of the link and test it against the headline of the page it leads to.
Unfortunately the headlines are coded with soft hypens (“”) in between the syllables of the words and the WebUI.verifyTextPresent() doesn’t match up the two versions.
It can’t be too complicated to match a word containing the soft hypens with a version not containing them since the chrome search finds the text without a problem. Is there a way to make Katalon also find the word?
That’s probably true, however, when you’re verifying in a test, you’re typically looking to be exact or very close to exact. Searching a web page (as provided by Chrome or any other browser) is intended for everyday humans who tend not to want absolute exactness.
If you have a complex scenario like you described (soft hyphens between each syllable? That’s crazy!) then you are probably going to have to do that comparison yourself.
Idea: If you know in advance the likely rendition of the text, why not supply that to the comparison in the test?
Lastly, post an example - working blind like this is not easy. Read this post for help providing the information we need: