ParametersToStr (QTP, TestComplete, VBScript)
Parent page: Service Functions – Dictionary (QTP, TestComplete, VBScript)
Description
Does exactly opposite what AssociateParameters does – converts a Dictionary back to the string of pairs. Special characters are treated.
Implementation
Public Function ParametersToStr(ByRef objDictionary) Dim Iter, dvKeys Dim sParameter, sKey, sValue sParameter = "" dvKeys = objDictionary.Keys() For Iter = 0 To UBound(dvKeys) sKey = dvKeys(Iter) sValue = Replace(objDictionary.Item(sKey), ",", "\,") sValue = Replace(sValue, "=", "\=") sKey = Replace(sKey, ",", "\,") sKey = Replace(sKey, "=", "\=") sParameter = Add2List(sParameter, sKey & " = " & sValue, ", ") Next ParametersToStr = sParameter End Function