Search code examples
javascriptpostman-pre-request-script

How to access the window object in Postman


I want to write a simple Pre-request Script in Postman that asks for a user confirmation if the request should really be executed. I think about using

var confirmed = confirm("Start request?");

or

var confirmed = window.confirm("Start request?");

But it states "confirm is not defined" or "window is not defined".


Solution

  • You can't access to postman window via javascript code. But fortunately there is suggestion for the feature.

    You can check this to know about the feature and the release time