We have a large number of requests in a collection manage in separate folders. I am trying to retrieve the name of the folder for the request in the pre-request script section. Is there any property available in pm object for the same?
Kurmavatar
(Subramanya Raj)
March 23, 2021, 9:01am
2
Hi @postmanlen
This thread below should help you with this:
Hi @hbertsch !
Outside of creating a Collection object, there isn’t a Sandbox method for getting folder name right now (but we do have an open feature request for it )
How many folders are you dealing with? What about this:
In each folder, add a pre-request script that sets a local variable with the name of the folder. You’d have to hard-code the folder name value, but if you don’t have a ton of folders this could work:
Folder A —> Pre-request script —> pm.variables.set('folder_name','Folder A…
system
(system)
Closed
December 12, 2024, 12:57pm
3
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.