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

Extract values from coded step/code behind

2 Answers 148 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Austin
Top achievements
Rank 1
Austin asked on 28 Feb 2018, 10:06 PM

I want to set a databind variable through the coded step so that it can be repurposed and used in the test case front end.  I've tried the following:

SetExtractedValue("extractedVarName", localVar.ToString());

and tried calling the extractedVarName in a recorded Verify step however it doesn't seem to be valid and fails.

Any help would be greatly appreciated.

 

Thank you.

2 Answers, 1 is accepted

Sort by
0
Nikolay Petrov
Telerik team
answered on 02 Mar 2018, 03:56 PM
Hi Austin,

I managed to create sample scenario using the latest version of the product (2018.1.130). Please, note that you have to type explicitly the name of the extracted in coded steps variable when using it in a verification step. I attached a screenshot for a reference.
The code in the codes step is the following:
string localVar = "OPA!!!";
this.SetExtractedValue("extractedVarName", localVar.ToString());

I hope this information is helpful.

Best Regards,
Nikolay Petrov
Progress Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
us your feedback!
0
Austin
Top achievements
Rank 1
answered on 05 Mar 2018, 06:06 PM

Hi Nikolay:

Thank you for getting back to me.

I will try this out, thanks for also identifying that I have to manually type out the binding name that was called and that it would not be available in a dropdown.

 

Tags
General Discussions
Asked by
Austin
Top achievements
Rank 1
Answers by
Nikolay Petrov
Telerik team
Austin
Top achievements
Rank 1
Share this question
or