How to clear console of postman programmatically
Asked Answered
G

2

7

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?

Glossotomy answered 3/3, 2019 at 10:9 Comment(0)
A
5

"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

Abstinence answered 3/3, 2019 at 11:26 Comment(0)
M
5

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

console.clear();
Monogenetic answered 3/1, 2023 at 18:24 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.