GetDataSource method

Relevant for: API testing only


Accesses the specified data source.

Note: This method is typically used when setting a value for a property, parameter, or variable. It is also used in conjunction with other methods which enable you to use the data from the data source, such as GetValue or SetValue.

Back to top


Test Entities

Back to top


property value = GetDataSource("<Data source name>").

Back to top


Parameter Description
Data source name

The name of the data source, exactly as it appears in the Data pane.

Note: You can right-click the data source in the Data pane and select Copy to ensure that you use the correct name in your code.

Back to top

Return Type

No explicit return object - method only accesses the data source.

Back to top


var DataSourceValue = GetDataSource("WebServiceData!Input").GetValue(0, "CustomerName");

Back to top