Forum Discussion

shankar_r's avatar
shankar_r
Community Hero
8 years ago

Script Extension : Reading Config file

Hi,

 

Most of us heard about config.properties [sample file attached] file java. This script extension having ability to read and return the config file values in Test Complete.

 

Implementation and methods,

Before you use config utility, First set the config file path using 1) point.

 

1)setConfigFilePath(<FilePath>) - To set the configuration file path.


2)getRowCount - To get total number of rows available in the Config file.


3)getAllParameterNames - To get array of parameter names.


4)getAllValues - To get array of parameter values.


5)getParamValue(<ParamName>) - To get the parameter value.


6)getValueofValue(<value>) - Function used to get the value from the Param Value surrounded with []. For Ex: paramavalue[ok]. This function will return the ok.


7)getParamValueofValue(<value>) - Function used to get the value from the Param Value surrounded with []. For Ex: paramavalue[ok]. This function will return the paramvalue.

 

You can download the script extension from here https://bitbucket.org/privateteamogre/scriptextensions/downloads/ConfigUtility.tcx

 

Let me know if you face issues with it.