The following error message shows the Actual and Expected results, but they look the same to me:
Attribute 'InnerText' of element for item 'Phoenix_OrdersRepository.TradeKingLIVE.Content.Alerts' does not match the specified value (actual='Alerts ', expected='Alerts ').
Any ideas on what is going wrong?
Verification fails with Actual = Expected
Verification fails with Actual = Expected
Thanks,
Zoë (aka zoework)
Zoë (aka zoework)
Re: Verification fails with Actual = Expected
Hi,
In my opinion, there are some invisible characters at the end of validated strings (like the end of line, new line, tab instead of space or multiple spaces) not visible in report? Have you tried to debug the code and examine the validated strings? I'm sure you can find the difference in debug
In my opinion, there are some invisible characters at the end of validated strings (like the end of line, new line, tab instead of space or multiple spaces) not visible in report? Have you tried to debug the code and examine the validated strings? I'm sure you can find the difference in debug

Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration
Re: Verification fails with Actual = Expected
I agree with Pavel, it is probably capturing some non-printable whitespace characters at the end.
Also, instead of using Attribute Equal, you could try Attribute Regex and trim the whitespace from the expected value.
Also, instead of using Attribute Equal, you could try Attribute Regex and trim the whitespace from the expected value.
Shortcuts usually aren't...
Re: Verification fails with Actual = Expected
Thanks everybody. I'm now using AttributeContains instead of AttributeEquals and it works fine.
Thanks,
Zoë (aka zoework)
Zoë (aka zoework)