We are building a new experience for our SmartBear Community.
This site is now read-only. You can still browse and search as usual. Learn More
This site is now read-only. You can still browse and search as usual. Learn More
From my experience when \n exist in your text to move around as you are doing, you face restrictions as you experience.
A suggestion, in your case would it be possible to use two variables?
Read from page A element and save to variable A.
Read from page B element and save to variable B.
Compare variable A with Variable B.
Hope that helps.
Before comparing the strings you could also strip out the offending new line/carriage return characters with aqString.Replace. Just replace them with "".
https://support.smartbear.com/testcomplete/docs/reference/program-objects/aqstring/replace.html
You can further normalize the strings with aqString.Trim. It will remove spaces and control characters for you.
https://support.smartbear.com/testcomplete/docs/reference/program-objects/aqstring/trim.html
Thanks for your advice!
Because the above solution is working I'm gonna refrain from adding code snippets to the Keyword test, but I'll keep that in mind in case I need it for something similar later. The new line/carriage return chars are not important for what we're testing.