mardi 13 avril 2021

How do you copy response values to the clipboard in Postman javascript tests?

I've recently found out about the ability in postman to write pre-request and test scripts using javascript.

I'm trying to figure out if it's possible to copy a value to the clipboard during a test in conjunction with setting the postman environment variable.

For example:

var jsonData = JSON.parse(responseBody);
postman.setEnvironmentVariable ("Action ID", jsonData.ActionId);
// set jsonData.ActionId to clipboard

Aucun commentaire:

Enregistrer un commentaire