RunProcess node not working as expected

 

Hi Folks.

I'm trying to use RunProcess in conjunction with headless chrome to capture parts of a webpage as a png file.
(Here's a how-to describing the process: https://developers.google.com/web/updates/2017/04/headless-chrome)

The chrome installation folder is mapped in my PATH EnvVar.
So when I invoke the windows commandline and use this command:
chrome.exe --enable-logging --headless --disable-gpu --screenshot=%cd%\screenshot.png "https://aximmetry.com/products"
it renders a png of that website into my current directory.

But when I use the same command within RunProcess nothing happens.
(Apart from a windows commandline window popping up)


I also tried various combinations StdInput /Output/... switches to no avail.
Thanks for any hint.

Eric.



   EricWest

 
Profile Image
Eifert@Aximmetry
  -  

Hi Eric,

I don't think you really need Command Prompt for this.
This worked for me:

C:\Program Files\Google\Chrome\Application\chrome.exe
--enable-logging --headless --disable-gpu --screenshot=C:\directoryandfilename.png "https://aximmetry.com/products"

However, I couldn't make the Current Directory work in this way. But if you want to change the directory on the run, you can just parse a text and connect it to the Command Line input pin of the Run Process module.

Warmest regards,

;