You can disable the Chrome sign in, save password and privacy feature dialogs via registry entries. (Tested on Azure, Windows 10 image with Chrome 126.) This is especially useful for those of us who don't want to use OCR or generally don't want to have extra steps in test automation because of the annoying dialogs mentioned.
If you set the following registry values to zero (REG_DWORD 0x0), the dialogs will not appear.
Key:
HKEY_LOCAL_MACHINE\Software\Policies\Google\Chrome
Values:
BrowserSignin
PasswordManagerEnabled
PrivacySandboxPromptEnabled
Documentation: BrowserSignin, PasswordManagerEnabled and
PrivacySandboxSiteEnabledAdsEnabled
Because the values are under
HKEY_LOCAL_MACHINE
you have to write them with admin rights.
In our azure pipeline, there is a power-shell custom script that is executed with admin rights at the beginning, i.e. when the image is started.
We set the values there:
reg add "HKEY_LOCAL_MACHINE\Software\Policies\Google\Chrome" /v BrowserSignin /t REG_DWORD /d 0 /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome" /v PasswordManagerEnabled /t REG_DWORD /d 0 /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome" /v PrivacySandboxPromptEnabled /t REG_DWORD /d 0 /f
We have inserted a control output in the batch file with which we start TestComplete to see whether the settings have actually been made:
REG QUERY "HKEY_LOCAL_MACHINE\Software\Policies\Google\Chrome" /v BrowserSignin
REG QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome" /v PasswordManagerEnabled
REG QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome" /v PrivacySandboxPromptEnabled
I hope this helps you.