Actual and expected text

com.kms.katalon.core.exception.StepFailedException: Actual text ‘JENIS
BONUS’ and expected text ‘JENIS
BONUS’ of test object ‘Object Repository/Promo/Column Jenis Bonus’ are NOT matched.

Do you have any solution ?

my guess is, that there are white characters in either web page and in object definition in OR that are different (CR and CR/LF).
i would try:

  1. check for words separately and use AND
  2. before any comparison i would get rid of all white characters
1 Like

There is a magical character called   (non-breaking space), which looks like a regular space, but Strings are not equal when you use it in one of them.

So you may want to try to replace it before comparison:

String.replaceAll("\u00a0"," ")
1 Like

OK . Thank you. solved

Hi @asikinaul

Can you mark the answer that solved the problem as the solution so that others can benefit from it ? Thanks.