Steps to reproduce:
1. Assume I had parametrized a POST request
{“email”: “${Login}”, “password”: “${Password}”}}
2. Assume I had created a variables named “Login” and “Password”
3. Assume I write a method where I initialized these variables and then call WS.Sendrequest:
Definition:
public static SendRequest (RequestObject _request, Map _map)
{
_request.setVariables(_map)
def response = WSBuiltInKeywords.sendRequest(_request).getResponseText()
}
Call:
SendRequest(findTestObject(‘Object Repository/API/Test/UserLogin’), [(‘Login’):‘testlogin’, (‘Password’):‘testpassword’])
Expected behavior:
request had been send with body = {“email”: “testlogin”, “password”: “testpassword”}
**
Current behaviour:
**request had been send with body = {“email”: “”, “password”: “”}
**
Notes:
**1. If I initialized variables in WebService Request in project Object Repository, all works fine
2. If i get variables after initializing in function definition
println (_request.getVariables())
I will see a correct list of variables.
Nevertheless, they are not transmitted inside the request body, while not being initialized in Object Repository.