How to trim the data coming from a spread sheet

Best practices, code snippets for common functionality, examples, and guidelines.
tsahoo
Posts: 3
Joined: Sat Jan 09, 2016 10:20 pm

How to trim the data coming from a spread sheet

Post by tsahoo » Sun Jan 10, 2016 1:23 am

Hi,

I am using Ranorex out-of-box functionality for data driven testing (using Data Source/Data Binding options). So far it's working fine and didn't find any problem..

But recently business team started using the ranorex script for loading data. There are many instances where the script is failing because the data has additional space. Is there a way I can trim the data before entering into application field.

Thanks in advance.

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: How to trim the data coming from a spread sheet

Post by krstcs » Mon Jan 11, 2016 2:29 pm

You will have to do it in usercode: myString.trim();
Shortcuts usually aren't...