Page 1 of 1

Same actual and expected value but not match. Help

Posted: Wed Jul 12, 2017 8:57 pm
by yydpkm
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!

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

Posted: Thu Jul 13, 2017 12:57 pm
by jma
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.

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

Posted: Thu Jul 13, 2017 2:33 pm
by yydpkm
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.

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

Posted: Fri Jul 14, 2017 12:44 pm
by jma
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
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.