I need to extract a value from the server response that is in Unicode format but i need to sent it back decoded. Is it feasible with NeoLoad?
NeoLoad has built-in features to automaically decode extracted values like for example HTML or URL encoded values.
If you need to decode Unicode characters, you can create a Javascript to perform such actions.
Example:
// example, here is the extracted value "R\u00FCdlingen"var myVar = context.variableManager.getValue("Myextractor"); //Decode the Unicode charactersvar myValue = Packages.com.neotys.js.Decoder.decode(myVar); //Optionnaly log the resultslogger.debug("Extracted: <" + myVar + "> Converted: <" + myValue + ">"); // Here we set a Neoload variable that will have this content "Rüdlingen" context.variableManager.setValue("cityName_new",myValue);
For more information, see “NeoLoad Javascript API” under “Appendixes” section in NeoLoad documentation.