Problem with a text validation

Ask general questions here.
Munro89
Posts: 17
Joined: Thu Feb 18, 2010 10:06 pm

Problem with a text validation

Post by Munro89 » Thu Feb 18, 2010 10:23 pm

I designed a test that calls a validation in the usercode of the recording. The validation is supposed to read a value out of a label.

The recording is data-driven, and the validation is working on other data.

With the data I got now, the validation is runned 3 times :
1st time : "281,19 $" is expected
2nd time : "'47 874,29 $" is expected
3rd time : "37,62 $" is expected

Here is the result log from Ranorex :
1st time :
2010/02/18 16:17:46.443 INFO User Validating if cost is equal to '281,19 $'

2010/02/18 16:17:46.635 SUCCESS Validation Attribute 'Text' of element '{Text:281,19 $}' does match the specified value.
2nd time :
2010/02/18 16:18:14.421 INFO User Validating if cost is equal to '47 874,29 $'

2010/02/18 16:18:14.605 FAILURE Validation Attribute 'Text' of element '{Text:47 874,29 $}' does not match the specified value (actual='47 874,29 $', expected='47 874,29 $').
3rd time :
2010/02/18 16:18:39.146 INFO User Validating if cost is equal to '37,62 $'

2010/02/18 16:18:39.337 SUCCESS Validation Attribute 'Text' of element '{Text:37,62 $}' does match the specified value.

This is the same code that is ran 3 times, the recording is restarted between each data.

I don't know why it works for validation 1 and 3, but it fails on the 2nd... Please help :)

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Problem with a text validation

Post by Support Team » Mon Feb 22, 2010 9:50 am

Hi Munro89!

Which Ranorex Version do you use?
There was a bug in an older release when using tabs in your validation. Could it be that you're using the tabulator key in your input validation data?
Please update to the newest Ranorex Version! (Ranorex 2.2.2)

Best regards,
Christian
Ranorex Team
.
Image

Munro89
Posts: 17
Joined: Thu Feb 18, 2010 10:06 pm

Re: Problem with a text validation

Post by Munro89 » Tue Feb 23, 2010 9:55 pm

I'm currently using the latest version (2.2.2). I've started the developpement of this recording on 2.2.1 although. I modified the test after upgrading to 2.2.2 to have a cleaner object repository.
I never tried to validate the 47 874,29 $ value before upgrading to 2.2.2. I don't have any idea if it worked before.

I don't use tabs in my recording (neither the TAB key or a tab control).


Edit : After further investigation, I found that the space between the thousands and the hundreds did not have the same ascii code, even tho they appeared the same. After writing some custom code to change the values I am currently looking at, I got it working.