ChromeDriver --disable-notifications ?

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
user5274
Junior Coder
Posts: 43
Joined: Tue Aug 04, 2020 9:35 am

ChromeDriver --disable-notifications ?

Post by user5274 » Sat Aug 08, 2020 5:24 am

Hi, is it possible to launch ChromeDriver with options?

For example the 'chrome is being controlled by automated software' notification dropdown shadow is interfering with my image detections

can we add options like --disable-notifications and possibly load-extension ?

I can do the brute force way of removing the notification but even that has its weird lagging bug.

Thank you for any input

User avatar
Grovkillen
Automation Wizard
Posts: 1009
Joined: Fri Aug 10, 2012 2:38 pm
Location: Bräcke, Sweden
Contact:

Re: ChromeDriver --disable-notifications ?

Post by Grovkillen » Sat Aug 08, 2020 6:18 pm

I understand that the request is to be able to use command line switches which is available for the ChromeDriver.

More found here: https://peter.sh/experiments/chromium-c ... -switches/
Let>ME=%Script%

Running: 15.0.24
version history

User avatar
Grovkillen
Automation Wizard
Posts: 1009
Joined: Fri Aug 10, 2012 2:38 pm
Location: Bräcke, Sweden
Contact:

Re: ChromeDriver --disable-notifications ?

Post by Grovkillen » Sat Aug 08, 2020 6:22 pm

Link to the command line switch in question:

https://peter.sh/experiments/chromium-c ... ifications
Let>ME=%Script%

Running: 15.0.24
version history

User avatar
Marcus Tettmar
Site Admin
Posts: 7378
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: ChromeDriver --disable-notifications ?

Post by Marcus Tettmar » Mon Aug 10, 2020 6:48 am

If you first make sure ChromeDriver is not running you can then run it yourself, either manually before starting your script or via script. If it's already running then when the script tries to start it it should just use the same process already running:

Code: Select all

KillProcess>ChromeDriver.exe
Run>C:/.../ChromeDriver.exe --disable-notifications --etc
..
ChromeNavigate>etc..
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

user5274
Junior Coder
Posts: 43
Joined: Tue Aug 04, 2020 9:35 am

Re: ChromeDriver --disable-notifications ?

Post by user5274 » Fri Aug 28, 2020 11:33 pm

Ah i never tried that route. Ill have to test that.

Ive been using httprequest with a custom Json to pass all my custom data. Then Jsonparsing the result to get the sessionID then using that ID with MS15. my current tests are to connect to already running Chrome through debugger port

User avatar
Marcus Tettmar
Site Admin
Posts: 7378
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: ChromeDriver --disable-notifications ?

Post by Marcus Tettmar » Wed Sep 02, 2020 7:53 pm

Macro Scheduler v15.0.12 has just been made available which gives you the ability to set Chrome command line switches in the CHROMEDRIVER_OPTIONS variable, e.g.:

Let>CHROMEDRIVER_OPTIONS=--start-maximized, --disable-notifications
ChromeStart>session_id
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts