Forum Discussion
HKosova
13 years agoSmartBear Alumni (Retired)
Hi Raj,
When using the Equals or Contains comparison method, each character in the baseline value including extra spaces and line brakes (Chr(10)) in the middle of the value are significant. You can't simply remove them and expect the checkpoint to pass. For example, the string "AB CD" contains "B C", but doesn't contain "BC" — the same applies to checkpoints.
To ignore the middle spaces, you need to verify innerText against a regular expression instead:
When using the Equals or Contains comparison method, each character in the baseline value including extra spaces and line brakes (Chr(10)) in the middle of the value are significant. You can't simply remove them and expect the checkpoint to pass. For example, the string "AB CD" contains "B C", but doesn't contain "BC" — the same applies to checkpoints.
To ignore the middle spaces, you need to verify innerText against a regular expression instead: