6

I'm trying to write assertions for api testing using postman. In order to debug I'm using console.log() function, which is cluttering the console of Postman.

I've tried console.clear(); in pre-request script but get TypeError.

Error in postman:

enter image description here

Can I programmatically clear the console in pre-request Script or Test section of Postman?

Dan Macak
  • 16,109
  • 3
  • 26
  • 43

2 Answers2

4

"Can I programmatically clear the console in pre-request Script or Test section of Postman?"

Not yet, but it's on the wish-list...

https://github.com/postmanlabs/postman-app-support/issues/4690

Richard Uie
  • 141
  • 4
3

It has now been implemented! https://github.com/postmanlabs/postman-app-support/issues/4690#issuecomment-1347768736

console.clear();
Frank Yin
  • 1,920
  • 1
  • 17
  • 12