Page 1 of 1

Validation not successfull

Posted: Mon Apr 03, 2017 8:52 am
by MB_wiko
Hello together,

we have some validations, which gives a not successfull test case, but I can not see why. We check the content of messages in our test cases. The strings expected are identical to the stirng, which are shown, but Ranorex says the strings are not identical:

Attribute 'InnerText' of element for item 'Produktiv_lokalRepository.WebDocumentLogin.PTag31032SteuerschluesselKonto3100D' does not match the specified value (actual=' 31032 Steuerschlüssel: Konto 3100 darf nicht mit Mehrwertsteuerschlüsseln bebucht werden.', expected='31032 Steuerschlüssel: Konto 3100 darf nicht mit Mehrwertsteuerschlüsseln bebucht werden.').
Unbenannt.PNG
I checked the 2 Strings above in Notepad, they are identical:

31032 Steuerschlüssel: Konto 3100 darf nicht mit Mehrwertsteuerschlüsseln bebucht werden.
31032 Steuerschlüssel: Konto 3100 darf nicht mit Mehrwertsteuerschlüsseln bebucht werden.

Has someone an idea?

Re: Validation not successfull

Posted: Mon Apr 03, 2017 9:50 am
by odklizec
Hi,

There seems to be an empty space in front of the 'actual' string. This is why the validation fails.

Re: Validation not successfull

Posted: Mon Apr 03, 2017 11:12 am
by MB_wiko
Sorry was the wrong example, her ethe right one.
Unbenannt.PNG
Thanks for our answer.

Re: Validation not successfull

Posted: Mon Apr 03, 2017 11:35 am
by odklizec
OK, there still may be some invisible/non-prinatable characters, either in reference or actual string. Any chance you can post a Ranorex snapshot and full Ranorex report? Eventually, examine the actual element with Ranorex spy.

Re: Validation not successfull

Posted: Mon Apr 03, 2017 1:13 pm
by MB_wiko
Thanks for our support. One question about the snapshot: What is the content of the snapshot? I read these are XML files with UI structure. I ask because we don't want to publish our business secrets into a public forum. Is it possible to get our application with reverse engineering over a snapshot?!? Or is the snapshot only the saved HMTL-page? Or the whole application?

Re: Validation not successfull

Posted: Mon Apr 03, 2017 1:19 pm
by odklizec
Ranorex snapshot stores application GUI in XML file. If you save it in uncompressed format, you can examine its content in any XML/text editor.

Re: Validation not successfull

Posted: Mon Apr 03, 2017 2:07 pm
by MB_wiko
Thanks for your answer: I found the reason for failing validation: The message start with new line in application, in test case I don't have the new line at the beginning. With this it works fine. Thanks a lot.
I didn't see the new line in Spy (attribute inner text) and in Ranorex test report, I found it in Chrome (HTML-View).