This is a migrated thread and some comments may be shown as answers.

How to trim databinded value?

3 Answers 105 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Cheryl
Top achievements
Rank 1
Cheryl asked on 02 Apr 2012, 02:31 AM
Hello

Is there a way, when using $(value) in the databinding property window for the verification step, to trim the value, eg $(value).trim or $(rtrim(citemtext))

Thanks

3 Answers, 1 is accepted

Sort by
0
Anthony
Telerik team
answered on 02 Apr 2012, 03:27 PM
Hello Cheryl,

No, you cannot trim the value directly in the Data Driven Editor.

As a work-around you can use a coded step to reference a data column or an extracted value, convert the value to a string, and use the String.Trim Method. Then you can set the resulting value as a new extracted value and bind that to subsequent steps.

Greetings,
Anthony
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
Cheryl
Top achievements
Rank 1
answered on 02 Apr 2012, 09:37 PM
in order to test a website that is incredibly dynamic, that is going to be a huge amount of work.  Perhaps this should be considered for the next version.

In the meantime, it will be quicker for me to trim the values in the SQL statement first.
0
Anthony
Telerik team
answered on 03 Apr 2012, 04:34 PM
Hello Cheryl,

I logged a feature request for this and you can vote for the PITS Issue here: Public URL.  

Greetings,
Anthony
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
Tags
General Discussions
Asked by
Cheryl
Top achievements
Rank 1
Answers by
Anthony
Telerik team
Cheryl
Top achievements
Rank 1
Share this question
or