title: How to allow to disable the mouse cursor in chrome with selenium?
body: <p>I'm trying to test a site with selenium (in java) which disables the mouse cursor at some point. During the test when the site tries to disable the mouse cursor, Chrome is waiting for the user to allow or not to disable the mouse pointer so the test can't finish correctly without user action. I had a similar problem with the notification "the site wants to store data in your device" but I solved with the option "--unlimited-storage". </p>
  
  <p>My question is how can do the same for mousecursor option for Chrome? Here my code:</p>
  
  <pre><code>ChromeOptions options = new ChromeOptions();
  options.setBinary(CHROME_EXE);
  options.addArguments("--start-maximized");
  options.addArguments("--unlimited-storage");
  Map&lt;String, Object&gt; prefs = new HashMap&lt;String, Object&gt;();
  prefs.put("profile.content_settings.mouselock",0);//Also tried with "default_content_settings"
  options.setExperimentalOption("prefs", prefs);
  WebDriver driver = new ChromeDriver(options);
  </code></pre>
  
  <p>I've tried the same with cookies to see if it's working but nothing. </p>
  
  <pre><code>prefs.put("profile.default_content_settings.cookies",0);//Also tried with 1 and 2 but the settings didn't change
  </code></pre>
  
  <p>Here some other piece of code I've tried:</p>
  
  <pre><code>Map&lt;String, Object&gt; prefs = new HashMap&lt;String, Object&gt;();
  Map&lt;String, Object&gt; pattern = new HashMap&lt;String, Object&gt;();
  Map&lt;String, Object&gt; excep = new HashMap&lt;String, Object&gt;();
  excep.put("setting", 1);//Tried also with 0
  pattern.put("[*.].mysite.com,*", excep);
  prefs.put("profile.default_content_settings.exceptions.mouselock",pattern);
  </code></pre>
  
  <p>Any idea about how to set up chrome preferences (that works) in the ChromeDriver, please?</p>
  
  <p>Thanks in advance for any response.</p>