Chrome, web page and move windows

Hello, I have to use node-red for several things:

First, I have to succeed in launching chrome, I used "Exec" function for this

Second, and this is where I block, I have to open a web page on it.

And lately, I have to be able to move the window to another screen if it detects a screen and put it in full screen. All this to do on node-red and everything has to be done automaticly.

Chrome has a lots of comand line switches for things like window-position etc.
If you just add the url to open to the command it should open that page for you.
You can test all these outside of Node-RED then move them to the exec node when you have it working.

Thank you for your response. Do you know when I can find help for that ? To learn how to do ?

Try searching the web for "Chrome command line switches".

Keep in mind that some options are platform-specific and might not work.

Just to find how to execute chrome with node-red is very difficult. I don't find how to do it unfortunatly

This is the command I do in Exec node : path\script.cmd start chrome ""

I don't think that it's a good idea doing that in the first place. As soon as you start Node-RED as a background service, it wouldn't work anyway.

Ok so I can forget that

Maybe with some workarounds I'm not aware of.

Someone asked a similar question here:

Have you thought of using the WDIO nodes? They are geared towards web automation (think of Selenium on steroids). They definitely let you open a browser, connect to specific URLs and input / read data from the browser. You can also resize the browser to specific sizes. I'm not sure about the 'position on different screens' aspect though.

WDIO offers an enourmous set of capabilities - possibly more than you need.

Note: if you go this route I'd recommend 'selenium-standalone' (npm package) be installed on the machine you want the browser to be executed on. This also means you need to have basic Java and run it from a shell session.

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