bruno icon indicating copy to clipboard operation
bruno copied to clipboard

JavaScript API changed, unable to set variables,

Open joe-gre opened this issue 7 months ago • 4 comments

I have checked the following:

  • [X] I use the newest version of bruno.
  • [X] I've searched existing issues and found nothing related to my issue.

Describe the bug

I recently updated Bruno to the latest version and noticed my pre request scripts were failing because bru.getProcessEnv() and bru.getVar() were null. I see now that the bru object no longer has these functions and instead has processEnvVars and requestVariables properties. The documentation only mentions the functions that are no longer present.

The issue I have is though I can retrieve variables using the properties mentioned above, I can't set them there. The bru.setVar() function was removed. If I assign values to them, they aren't actually saved. I need to be able to save variables for my login flow.

.bru file to reproduce the bug

No response

Screenshots/Live demo link

image

image

joe-gre avatar Jul 16 '24 03:07 joe-gre