Function with Puppeteer

Hi
I have a working javascript file that uses Puppeteer to submit a form. I would like to use this in a Node Red function, I have added the puppeteer library in the set up of the function but there are errors in the function on document. I have attached a screenshot. Any advice appreciated

Functions run in the node-red runtime (in node, not in a browser). Therefore there is no document object.

That doesn't mean it is not doable. The example in the readme might work out of the box.

However: do you really need to run puppeteer? It is quite heavy weight. Can't you simply do a HTTP POST using the built in HTTP request node?

Thanks Steve, I did try and HTTP request and then a POST but couldn't get it to work. This was plan B

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.