I need to convert the below value into a valid URL
"\x2fsap\x2fbc\x2fwebdynpro\x2fsap\"
when I use the functions in neoload javascript using hardcoded value I get the correct value but when I use the extracted parameter which has similar value it gives me a different output.
var myVar = encodeURIComponent("\x2fsap\x2fbc\x2fwebdynpro\x2fsap\");
var uri_dec = decodeURIComponent(myVar);
context.variableManager.setValue("URL2", uri_dec);
Output : URL2=/sap/bc/webdynpro/sap/
URL_HTML1 is the extracted parameter
Value in URL_HTML1=\x2fsap\x2fbc\x2fwebdynpro\x2fsap\
var myVar1 = encodeURIComponent(URL_HTML1);
var uri_dec1 = decodeURIComponent(myVar1);
context.variableManager.setValue("URL3", uri_dec1);
Output: URL3=\x2fsap\x2fbc\x2fwebdynpro\x2fsap\