postman-app-support
postman-app-support copied to clipboard
Postman crashes when using .contains() on HTML.
trafficstars
Is there an existing issue for this?
- [X] I have searched the tracker for existing similar issues and I know that duplicates will be closed
Describe the Issue
When trying to find a string in a 134 line HTML health check page, Postman will crash.
Steps To Reproduce
- Insert the following script in the Post-Response tab. const $ = require("cheerio").load(pm.response.text()); pm.expect($('body:contains("YOUR TEXT GOES HERE")')).to.be.true;
- Point your GET to a simple HTML page. Mine is VERY simple and contains no scripts and all of the HTML is contains only the most basic tags such as ,
,
(etc), as well as and
- Run the call.
Screenshots or Videos
https://github.com/postmanlabs/postman-app-support/assets/8657627/d66c477f-a2d8-4124-8a27-4e01b5af4c19
Operating System
Windows
Postman Version
11.0.6
Postman Platform
Postman App
User Account Type
Signed In User
Additional Context?
This is the first time I've tried to parse an HTML file in Postman. In the past, I've only done this with JSON and XML.