Validation not successfull

Ranorex Studio, Spy, Recorder, and Driver.
MB_wiko
Posts: 93
Joined: Fri Sep 09, 2016 1:05 pm
Contact:

Validation not successfull

Post by MB_wiko » Mon Apr 03, 2017 8:52 am

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?
You do not have the required permissions to view the files attached to this post.

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 7470
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Validation not successfull

Post by odklizec » Mon Apr 03, 2017 9:50 am

Hi,

There seems to be an empty space in front of the 'actual' string. This is why the validation fails.
Pavel Kudrys
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

MB_wiko
Posts: 93
Joined: Fri Sep 09, 2016 1:05 pm
Contact:

Re: Validation not successfull

Post by MB_wiko » Mon Apr 03, 2017 11:12 am

Sorry was the wrong example, her ethe right one.
Unbenannt.PNG
Thanks for our answer.
You do not have the required permissions to view the files attached to this post.

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 7470
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Validation not successfull

Post by odklizec » Mon Apr 03, 2017 11:35 am

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.
Pavel Kudrys
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

MB_wiko
Posts: 93
Joined: Fri Sep 09, 2016 1:05 pm
Contact:

Re: Validation not successfull

Post by MB_wiko » Mon Apr 03, 2017 1:13 pm

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?

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 7470
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Validation not successfull

Post by odklizec » Mon Apr 03, 2017 1:19 pm

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.
Pavel Kudrys
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

MB_wiko
Posts: 93
Joined: Fri Sep 09, 2016 1:05 pm
Contact:

Re: Validation not successfull

Post by MB_wiko » Mon Apr 03, 2017 2:07 pm

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).