Get/Set Extracted Variables in Code

Using Extracted variables in Test Studio tests can be accomplished as well without using code.

Use the SetExtractedValue() method to set the value of an extraction variable so it can be used later in a standard action or verification step:

string area = "Atlanta";
SetExtractedValue("extractedID", area);
Dim area As String = "Atlanta"
SetExtractedValue("extractedID", area)

Use the GetExtractedValue() method to use the extracted variable in a coded step:

object myData = GetExtractedValue("varname");
Dim myData As Object = GetExtractedValue("varname")
In this article
Not finding the help you need? Improve this article