Hello everyone,
I am pretty new in both automation tests and postman and would appreciate your advice.
I have such request in Pre-req scripts
pm.sendRequest({
url: "https://uuidentity.plus4u.net/uu-oidc-maing02/bb977a99f4cc4c37a2afce3fd599d0a7/oidc/grantToken", method: 'POST', header: { 'Accept': 'application/json', 'Content-Type': 'application/x-www-form-urlencoded' }, body: { mode: 'urlencoded', urlencoded: [ {key: "accessCode1", value: "XXX", disabled: false}, {key: "accessCode2", value: "XXX", disabled: false}, {key: "grant_type", value: "password", disabled: false}, {key: "scope", value: "openid https", disabled: false}, ] }
}, function (err, res) {
pm.environment.set("TOKEN",res.json().id_token);
});
And my question is how to use (get) variables stored at the environmental level and use them to “value” to be this script correctly sent. I do not want to use visible passwords in these values.
{key: "accessCode1", **value: "XXX"**, disabled: false}, {key: "accessCode2", **value: "XXX"**, disabled: false},
Many thanks for your help