Is it possible to use variables in Web Service URL?

Hi there -

I'd like to use a variable in Web Service object's URL. Is it possible?


Something like: GET {GlobalVariable.katalonUrl}/path/to/something

And katalonUrl is ""


Thank you.


  • Never mind, this is great solution, too.
    You guys rock! I really appreciate your help here. Thank you!!!
  • Hi Marek, I find the next solucion

    I use the replace method, first in the request change de fix value por a any variable, next I use the replace the value and next set for setter the value.

    Name and Value for Request

    {"CustomerMng_ConsultaCliente_Request":{ "Header":{ "SecurityHeader":{ "User":"UsrPortal", "Password":"PasswdPortal"}, "System":{ "InputSystem":"Portal", "ApplicationID":"SWPR108", "TransactionID": "10111516", "IPAddress ": "192.168 .0 .1 " }}, "Body": {"Cliente": {"TipoIdentificacion": "TipoId", "NumeroIdentificacion": "NumId", "Id":"1", "TipoIdResponsable":"TipoIdRespo", "NumeroIdResponsable":"NumIdRespon", "OpcionConsulta":"OpcionCon" }}}}
    RequestObject serConsultar = findTestObject('ConsultarCliente')

    Test Case (Script Mode)
    a = serConsultar.getRestParameters().get(0).getName().replace('NumId', NumeroIdentificacion).replace('TipoId', TipoIdentificacion).replace(
    'TipoIdRespo', TipoIdResponsable).replace('NumIdRespon', NumeroIdResponsable).replace('OpcionCon', OpcionConsulta)


    ResponseObject response = WS.sendRequest(serConsultar)

Sign In or Register to comment.