Newman is throwing error "pm.request is invalid"

In Newman scripts , i am using pm.request.
While running i am facing the error “pm.request” is invalid.

Hi @Lalith_Vignesh,

If you are looking to send a request to the browser, the command would be pm.sendRequest() and not pm.request, an example of executing this would be seen in the link below along with many other test script options:
https://learning.getpostman.com/docs/postman/scripts/postman_sandbox_api_reference

Have a look at the link below to get an idea about running collections using Newman.
https://learning.getpostman.com/docs/postman/collection_runs/command_line_integration_with_newman/

1 Like

Thanks.I ran the script with pm.sendRequest().Now it is working fine.