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.
The \n and other marks are added automatically when the object is selected to create a checkpoint, but they disappear when set them to a String Variable.
TC is only doing what you instruct it, to do. You have to check and verify the contents are captured correctly, in order to perform the comparison. Also, ensure that your variable is not modified afterwards.
Your approach is correct, and it's what I use all the time when scripting.
Here's a simple example,
Keyword stepsOutput results
Thank you for your help and advice.