Same actual and expected value but not match. Help

Bug reports.
yydpkm
Posts: 12
Joined: Wed Jul 12, 2017 8:33 pm

Same actual and expected value but not match. Help

Post by yydpkm » Wed Jul 12, 2017 8:57 pm

This is pretty weird. I just use the record and play. As the error message below, that actual value and the expected value are exact same. This only happens with Chrome. It works fine with IE.


Error Message: Validation Failure
Attribute 'InnerText' of element for item 'TestHDSearchRepository.HealthDiscoverySpecimens.LblError' does not match the specified value (actual='Error authenticating user. The user name or password is incorrect. ', expected='Error authenticating user. The user name or password is incorrect. ').

OS : Windows 7 Service Pack 1 64bit
OS version : 6.1.7601
32bit
Ranorex version: 5.2.2.21596
Runtime version: 4.0.30319.42000

Thanks!

jma
Posts: 111
Joined: Fri Jul 03, 2015 9:18 am

Re: Same actual and expected value but not match. Help

Post by jma » Thu Jul 13, 2017 12:57 pm

Hi,

First of all, you still use a very old version of Ranorex. Generally, I would suggest updating to the latest version, Ranorex 7.1.0.

Please open the corresponding *.rxlog.data file and double-check the actual and the expected value. I assume that one of those values contains an HTML entity, which is resolved in the Ranorex Report viewer. As a result, the values in the Ranorex Report look the same although they are actually different.

yydpkm
Posts: 12
Joined: Wed Jul 12, 2017 8:33 pm

Re: Same actual and expected value but not match. Help

Post by yydpkm » Thu Jul 13, 2017 2:33 pm

Work doesn't allow me to update.

After I go in to data file. I find the difference. There is a space at the end.
'Error authenticating user. The user name or password is incorrect.' (actual)
'Error authenticating user. The user name or password is incorrect. ' (expected)



I am new to this and don't know where to start to fix this. Any idea?

I have doubts because it works fine when I only run test on Chrome. However, if I let run both IE and Chrome, then this thing came up. I don't see why here.

jma
Posts: 111
Joined: Fri Jul 03, 2015 9:18 am

Re: Same actual and expected value but not match. Help

Post by jma » Fri Jul 14, 2017 12:44 pm

Most probably, the value also contains a space at the end if the value is read from Chrome. But, in IE there's no additional space and the test fails.
ValidateRegex.png
ValidateRegex.png (4.6 KiB) Viewed 678 times
If this is the case, I would suggest removing the additional space from the expected value and using the Validate - AttributeRegEx action. As a consequence, the test should work in IE and Chrome.