David
David

Reputation: 197

chromedriver 'sync is disabled by your administrator' - how to enable with argument?

I am trying to automate a test which relies on access to a chrome user credential for the user logged into the Chrome browser. However, after logging into the browser (chromedriver), a message appears:

'sync is disabled by your administrator'

And from this point onwards, the chrome extension I am trying to test, cannot resolve the identity of the user. This can be checked in the Chrome console with: chrome.identity which returns: undefined

I have found arguments to hopefully enable normal-browser (non chromedriver) sync conditions, however I'm unsure which argument is relevant. Furthermore, none seem to make any difference. (including the --start-maximized example command - which I also need to get working as chromedriver is starting minimized each time)

I have tried:

DesiredCapabilities chromeCapabilities = DesiredCapabilities.chrome(); 
ChromeOptions myChromeOptions = new ChromeOptions();

myChromeOptions.addArguments("--allow-autofill-sync-credential");
myChromeOptions.addArguments("--enable-clear-sync-data-on-passphrase-encryption");
myChromeOptions.addArguments("--enable-drop-sync-credentialn");
myChromeOptions.addArguments("--enable-manager-for-sync-signin");
myChromeOptions.addArguments("args=--start-maximized");
myChromeOptions.addArguments("--start-maximized");
chromeCapabilities.setCapability(ChromeOptions.CAPABILITY, myChromeOptions);}

Where am I going wrong? Thanks

Upvotes: 1

Views: 8883

Answers (2)

MoBKK
MoBKK

Reputation: 101

For Mac

sudo defaults write com.google.Chrome SyncDisabled -bool false

Upvotes: 1

Saurabh R S
Saurabh R S

Reputation: 3177

You will need to change the setting of Chrome due to which you are getting the message: 'Sync is disabled by your administrator'
To do this in Windows - Open 'Registry Editor' and go to-

Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome  

Change the value of SyncDisabled to 0

Restart Chrome.

Upvotes: 6

Related Questions