Page 1 of 1

Ignore spacing - Validation

Posted: Tue Jan 23, 2018 3:01 pm
by armstronghm24
I am trying to validate some text which contains spacing. How do I ignore any spacing when validating text against a variable. Here's an example of something I want to validate:
Rule Error
01 of 01

1234 INCREASES TO VARIABLE WHOLE LIFE AMOUNT NOT
ALLOWED AFTER 90 DAYS FROM

ISSUE DATE xx-xx-xxxx
------------------------------------------------------------

I would just like to validate that field contains: "Increases to variable whole life amount not allowed after 90 days from issue date". I am able to validate that it contains "Increases to variable whole life amount not", but when I try validating the field contains "Increases to variable whole life amount not allowed after 90 days from issue date", the validation doesn't work. I am assuming it is because the text falls on 3 separate lines. How do I get around this?

Re: Ignore spacing - Validation

Posted: Tue Jan 23, 2018 9:54 pm
by Support Team
Hi armstronghm24,

There can be several ways to handle this but varies on the element itself. Are the lines all within one element or are they spread across multiple elements? With a Ranorex Snapshot of this problematic element, I will be able to further assist you.

Cheers,
Ned

Re: Ignore spacing - Validation

Posted: Thu Jan 25, 2018 4:33 pm
by armstronghm24
Hi,

I would attach a snapshot if I could get one of the specific element. However, it is capturing my entire application which has confidential information at the moment. Do you know if there's a way to get the specific element in a snapshot? Otherwise I can tell you that the lines are all within one element. If that snapshot isn't possible or that isn't enough information to go on, I'll work on getting a snapshot with fake data...

Re: Ignore spacing - Validation

Posted: Thu Jan 25, 2018 5:13 pm
by odklizec
Hi,

You can try to generate the snapshot with unchecked option "Let snapshot contain complete ancestor subtree" as described here:
https://www.ranorex.com/forum/browsing- ... tml#p33974
This should limit the snapshot to just selected element.

Re: Ignore spacing - Validation

Posted: Thu Jan 25, 2018 7:45 pm
by armstronghm24
I have a snapshot of the element attached.

Thanks for your help.