AnsweredAssumed Answered

Modifying URLPARAM0 value dynamically

Question asked by AirySoft on Oct 19, 2017
Latest reply on Oct 19, 2017 by AirySoft

I am trying to modify URLPARAM0 argument in lisa.vse.request using beanshell. I have created JSR-223 step after HTTP/s Listner step. I have couple of issues in this:

 

1. _logger.debug is not working for me.

2. lisa_vse_request.setArguments(valueToAdd); is throwing error.

 

=========================================================

//Code: Beanshell

=========================================================

import com.itko.util.ParameterList;
import com.itko.util.Parameter;

_logger.debug("All Arguments:");
ParameterList args = lisa_vse_request.getArguments();

String valueToAdd = "";

// I have only one Argument - which is URLPARAM0
for(i=0;i<args.size();i++) {
   Parameter thisParameter = args.get(i);
   thisName = thisParameter.getName();
   thisValue = thisParameter.getValue();
   thisValue = thisValue.replaceAll("MigB6ScXQjCSnyg9-vQO7w", "MigB6ScXQjCSnyg9-vQO7Z");
   valueToAdd = valueToAdd + thisName + "=" + thisValue;
}
lisa_vse_request.setArguments(valueToAdd);
//ParameterList args = lisa_vse_request.getArguments();
return lisa_vse_request;

 

Any help is greatly appreciated.

Outcomes