# Chrome, web page and move windows

**URL:** <https://discourse.nodered.org/t/chrome-web-page-and-move-windows/21963>\
**Category:** General\
**Created:** [19 February 2020 08:42 UTC](https://discourse.nodered.org/t/chrome-web-page-and-move-windows/21963 "2020-02-19T08:42:34Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![bibou](https://avatars.discourse-cdn.com/v4/letter/b/22d042/32.png) [@bibou](https://discourse.nodered.org/u/bibou)\
**Post date:** [19 February 2020 08:42 UTC](https://discourse.nodered.org/t/chrome-web-page-and-move-windows/21963/1 "2020-02-19T08:42:35Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [19 February 2020 09:25 UTC](https://discourse.nodered.org/t/chrome-web-page-and-move-windows/21963/2 "2020-02-19T09:25:20Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![bibou](https://avatars.discourse-cdn.com/v4/letter/b/22d042/32.png) [@bibou](https://discourse.nodered.org/u/bibou)\
**Post date:** [19 February 2020 09:56 UTC](https://discourse.nodered.org/t/chrome-web-page-and-move-windows/21963/3 "2020-02-19T09:56:09Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![kuema](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/kuema/32/6542_2.png) [@kuema](https://discourse.nodered.org/u/kuema)\
**Post date:** [19 February 2020 10:01 UTC](https://discourse.nodered.org/t/chrome-web-page-and-move-windows/21963/4 "2020-02-19T10:01:59Z")

</div>

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

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

---

<div class="post-metadata">

**Author:** ![bibou](https://avatars.discourse-cdn.com/v4/letter/b/22d042/32.png) [@bibou](https://discourse.nodered.org/u/bibou)\
**Post date:** [19 February 2020 12:39 UTC](https://discourse.nodered.org/t/chrome-web-page-and-move-windows/21963/5 "2020-02-19T12:39:05Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![bibou](https://avatars.discourse-cdn.com/v4/letter/b/22d042/32.png) [@bibou](https://discourse.nodered.org/u/bibou)\
**Post date:** [19 February 2020 12:41 UTC](https://discourse.nodered.org/t/chrome-web-page-and-move-windows/21963/6 "2020-02-19T12:41:44Z")

</div>

This is the command I do in Exec node : **path\script.cmd start chrome "[https://www.google.fr](https://www.google.fr)"**

---

<div class="post-metadata">

**Author:** ![kuema](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/kuema/32/6542_2.png) [@kuema](https://discourse.nodered.org/u/kuema)\
**Post date:** [19 February 2020 12:42 UTC](https://discourse.nodered.org/t/chrome-web-page-and-move-windows/21963/7 "2020-02-19T12:42:41Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![bibou](https://avatars.discourse-cdn.com/v4/letter/b/22d042/32.png) [@bibou](https://discourse.nodered.org/u/bibou)\
**Post date:** [19 February 2020 12:43 UTC](https://discourse.nodered.org/t/chrome-web-page-and-move-windows/21963/8 "2020-02-19T12:43:43Z")

</div>

Ok so I can forget that

---

<div class="post-metadata">

**Author:** ![kuema](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/kuema/32/6542_2.png) [@kuema](https://discourse.nodered.org/u/kuema)\
**Post date:** [19 February 2020 12:46 UTC](https://discourse.nodered.org/t/chrome-web-page-and-move-windows/21963/9 "2020-02-19T12:46:17Z")

</div>

Maybe with some workarounds I'm not aware of.

Someone asked a similar question here:

> [@Open a web browser with EXEC node](https://discourse.nodered.org/t/open-a-web-browser-with-exec-node/5163):
>
> Hello, I'm attempting to use Node-Red to open a web browser UI on the Windows 10 PC which hosts Node-Red. I've tried using the EXEC node in spawn mode for this purpose with the command powershell start chrome, however chrome launches as 7 background processes rather than a chrome application with a desktop UI (i.e. no browser UI is visible in Windows). Node-Red is running under the admin user account, on a single user PC. My goal is to use Node-Red to open / close Chrome UI, and to control t…

---

<div class="post-metadata">

**Author:** ![PaulKeates1](https://avatars.discourse-cdn.com/v4/letter/p/97f17d/32.png) [@PaulKeates1](https://discourse.nodered.org/u/PaulKeates1)\
**Post date:** [21 February 2020 01:53 UTC](https://discourse.nodered.org/t/chrome-web-page-and-move-windows/21963/10 "2020-02-21T01:53:24Z")

</div>

Hi,  
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.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [21 April 2020 01:53 UTC](https://discourse.nodered.org/t/chrome-web-page-and-move-windows/21963/11 "2020-04-21T01:53:29Z")

</div>

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