postman-app-support icon indicating copy to clipboard operation
postman-app-support copied to clipboard

Postman crashes when using .contains() on HTML.

Open G-Laser opened this issue 1 year ago • 0 comments
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

  1. 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;
  2. 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
  3. Run the call.
  4. 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.

G-Laser avatar May 03 '24 16:05 G-Laser