Getting Rid of chrome is being controlled by...

Example scripts and tips (replaces Old Scripts & Tips archive)

Moderators: Dorian (MJT support), JRL, Phil Pendlebury

Post Reply
ocnuybear
Pro Scripter
Posts: 100
Joined: Sun Jul 15, 2018 5:14 pm

Getting Rid of chrome is being controlled by...

Post by ocnuybear » Sat Apr 09, 2022 6:02 pm

Was looking for a way to get rid of "chrome is being controlled by automated test software" running chrome via chromedriver, this is a workaround by first clicking on the x, then normalizing & maximizing Chrome it disappears, depending on Chrome updates this might eventually also not work, tested on Chrome 100.0.4896.75 (Official Build) (64-bit) DARK MODE, please remember to use dark mode or you can just update the embedded bitmap.

Code: Select all

Let>CHROMEDRIVER_OPTIONS=start-fullscreen
Let>CHROMEDRIVER_EXE=c:\chromedriver.exe
ChromeStart>session_id
SetFocus>data:, - Google Chrome
WaitWindowFocused>data:, - Google Chrome
Let>WSI_TIMEOUT=10
IfFileExists>%temp_dir%Cross.bmp
  DeleteFile>%temp_dir%Cross.bmp
EndIf
ExportData>CROSS.BMP_DATA,%temp_dir%Cross.bmp
FindImagePos>%temp_dir%Cross.bmp,WINDOW:data:%COMMA% - Google Chrome,0.7,1,XArr,YArr,NumFound,CCOEFF
If>NumFound>0
  MouseMove>XArr_0,YArr_0
  LClick
Endif
n1=0
While>n1<3
  n1=n1+1
  Press F11
  Wait>0.1
  Release F11
  Wait>0.1
EndWhile
ChromeNavigate>session_id,url,https://www.mjtnet.com/contact.htm
/*
CROSS.BMP_DATA:
424D960B00000000000036000000280000001A0000001C0000000100200000000000600B0000000000000000000000000000000000003A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3
635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A
3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3
A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF
3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF4A4746FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635F
F3A3635FF4A4746FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF7C7A79FFBEBDBDFF8C8A89FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF8C8A89FFBEBDBDFF7C7A79FF3A3635FF3A3635FF3A3635
FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF6B6868FFBEBDBDFFBEBDBDFF8C8A89FF3A3635FF3A3635FF3A3635FF3A3635FF8C8A89FFBEBDBDFFBEBDBDFF6B6868FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A363
5FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF8C8A89FFBEBDBDFFBEBDBDFF8C8A89FF3A3635FF3A3635FF8C8A89FFBEBDBDFFBEBDBDFF8B8A8AFF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A36
35FF3A3635FF8C8A89FFBEBDBDFFBEBDBDFF8C8A89FF8C8A89FFBEBDBDFFBEBDBDFF8B8A8AFF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF8C8A89FFBEBDBDFFBEBDBDFFBEB
DBDFFBEBDBDFF8B8A8AFF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FFADACACFFBEBDBDFFBEBDBDFFADABABFF3A3635FF3A3635FF3A3635FF3A3635FF3A
3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF8C8A89FFBEBDBDFFBEBDBDFFBEBDBDFFBEBDBDFF8C8A89FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3
A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF8C8A89FFBEBDBDFFBEBDBDFF8B8A8AFF8C8A89FFBEBDBDFFBEBDBDFF8C8A89FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF
3A3635FF3A3635FF3A3635FF8C8A89FFBEBDBDFFBEBDBDFF8B8A8AFF3A3635FF3A3635FF8C8A89FFBEBDBDFFBEBDBDFF8C8A89FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF6B6868FFBEBDBDFFBEBDBDFF8B8A8AF
F3A3635FF3A3635FF3A3635FF3A3635FF8C8A89FFBEBDBDFFBEBDBDFF6B6868FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF7C7A79FFBEBDBDFF8B8A8AFF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF8C8A89
FFBEBDBDFF7C7A79FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF4A4746FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF4A4746FF3A3635FF3A3635FF3A3635FF3A3635FF3A363
5FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A36
35FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3
635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A
3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3
A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF
3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635F
F3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635
FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A363
5FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF3A3635FF
*/

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

Re: Getting Rid of chrome is being controlled by...

Post by Grovkillen » Sat Apr 09, 2022 6:25 pm

Let>ME=%Script%

Running: 15.0.24
version history

ocnuybear
Pro Scripter
Posts: 100
Joined: Sun Jul 15, 2018 5:14 pm

Re: Getting Rid of chrome is being controlled by...

Post by ocnuybear » Sun Apr 10, 2022 1:47 pm

I have tried them all, but nothing worked, which one worked for you?

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

Re: Getting Rid of chrome is being controlled by...

Post by Grovkillen » Sun Apr 10, 2022 4:38 pm

Code: Select all

Run>"%CHROME_EXE%" --app=%URL_TO_SCRAPE%
And then I inject JS code using the console.
Let>ME=%Script%

Running: 15.0.24
version history

ocnuybear
Pro Scripter
Posts: 100
Joined: Sun Jul 15, 2018 5:14 pm

Re: Getting Rid of chrome is being controlled by...

Post by ocnuybear » Mon Apr 11, 2022 12:14 pm

Sorry I missed that part in the thread you quoted earlier, so basically you start chrome in a special way, but then you cannot attach chromedriver to it as well as using MS commands like ChromeExecute, not following how do you inject javascript using what console :o ?

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

Re: Getting Rid of chrome is being controlled by...

Post by Grovkillen » Mon Apr 11, 2022 8:03 pm

Yes, I open the console and paste the JS code and it'll do exactly what ChromeExecute is doing. Until we have a updated native MS ChromeDriver execution that accepts switches.
Let>ME=%Script%

Running: 15.0.24
version history

ocnuybear
Pro Scripter
Posts: 100
Joined: Sun Jul 15, 2018 5:14 pm

Re: Getting Rid of chrome is being controlled by...

Post by ocnuybear » Tue Apr 12, 2022 9:55 am

Still trying to figure out how do you access the chromedriver console via MS, have searched the forums here, but there is just bits & pieces, do you need to install Selenium drivers?

Please give me an example how to start & send js commands to the console?

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

Re: Getting Rid of chrome is being controlled by...

Post by Grovkillen » Tue Apr 12, 2022 11:48 am

Just use the regular chrome exe and add your JS code to the console.
Let>ME=%Script%

Running: 15.0.24
version history

ocnuybear
Pro Scripter
Posts: 100
Joined: Sun Jul 15, 2018 5:14 pm

Re: Getting Rid of chrome is being controlled by...

Post by ocnuybear » Tue Apr 12, 2022 12:24 pm

You mean Chrome's Developer Tools Console?

That means you have to communicate using ObjectSendText & OCRArea between Chrome & MS

How do you distinguish between old and new data in the console using OCR?

Isnt'n there a more direct connection to send & recieve Chrome data?

ocnuybear
Pro Scripter
Posts: 100
Joined: Sun Jul 15, 2018 5:14 pm

Re: Getting Rid of chrome is being controlled by...

Post by ocnuybear » Tue Apr 12, 2022 5:52 pm

This is what I have come up so far.
How do you start Chrome with the --app switch as well as bind the chromedriver to it to access it in the sub?

Code: Select all

RunProgram>"C:\Program Files\Google\Chrome\Application\chrome.exe" --app=https://www.mjtnet.com/contact.htm

Code: Select all

SRT>JS
  Let>HTTP_POSTJSON=1
  Let>body= { "script": "%ExecuteJS%", "args": [] }
  //if you are not using the standard port and have changed it with CHROMEDRIVER_PORT then change the port number here accordingly
  HTTPRequest>http://localhost:9515/session/%ExecuteJS%/execute,,POST,body,theResult
  MessageModal>theResult
End>JS

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

Re: Getting Rid of chrome is being controlled by...

Post by Grovkillen » Tue Apr 12, 2022 6:57 pm

I don't use ChromeDriver. I use either file download or window title to pass data between the chrome instance and MS.
Let>ME=%Script%

Running: 15.0.24
version history

robsmith
Newbie
Posts: 16
Joined: Mon Oct 30, 2023 2:12 pm
Location: USA

Re: Getting Rid of chrome is being controlled by...

Post by robsmith » Fri Apr 26, 2024 12:24 am

Make sure you have the required variables setup to use ChromeStart and ChromeExecute.

CHROMEDRIVEREXE=c:\path\to\chromedriver.exe
CHROMEDRIVERPORT=a valid port number
CHROMEDRIVEROPTIONS=any parameters you want to pass to chrome such as --incognito

I use the chrome builds at https://googlechromelabs.github.io/chrome-for-testing/

The -app switch gives you more screen to work with, but it does not get rid of the banner.

And after reading a long time, I decided I would not try to get rid of the 'chrome being controlled by' banner, other than by clicking the X. The other banner is clearly put there on purpose. As much as it can be annoying, it's working against the browser developers to try and remove it.

If you truly need to get rid of it, I suspect you would need to modify the chromium source and compile it yourself, or interact with the chrome developer console without using the chromedriver commands.

Much like the modern methods of javascript clipboard access are restricted for security, I think the banner is a way to deter malicious behavior.

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