We are building a new experience for our SmartBear Community.
This site is now read-only. You can still browse and search as usual. Learn More
This site is now read-only. You can still browse and search as usual. Learn More
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.
Nice.
Unless of course you are using Python in which case Config parsing is native. (Assuming the TC Python engine includes this default module)
https://docs.python.org/3/library/configparser.html
:smileyhappy: