title: Unable to Launch Google Chrome using default/custom profile in Selenium WebDriver that undergo http basic authentication
body: <p>Following methods are not working properly.
  Since GRID is used, <strong>capability</strong> is set as <strong>null</strong> here. </p>
  
  <pre><code>System.setProperty("webdriver.chrome.driver", "C:/chromedriver.exe");   
  DesiredCapabilities capability=null; 
  </code></pre>
  
  <p><strong>Method 1:</strong> </p>
  
  <pre><code>DesiredCapabilities capabilities = DesiredCapabilities.chrome();
  capabilities.setCapability("chrome.switches", Arrays.asList("--user-data-dir=C:/Users   /username/AppData/Local/Google/Chrome/User Data/Default"));
  driver = new ChromeDriver(capabilities);
  </code></pre>
  
  <p><strong>Method 2:</strong> </p>
  
  <pre><code>DesiredCapabilities capabilities = DesiredCapabilities.chrome(); 
  String chromeProfile = "C:/Users/username/AppData/Local/Google/Chrome/Application   /chrome.exe"; 
  ArrayList&lt;String&gt; switches = new ArrayList&lt;String&gt;(); 
  switches.add("C:/Users/username/AppData/Local/Google/Chrome/User Data/Default" + chromeProfile); 
  capabilities.setCapability("chrome.switches", switches); 
  driver = new ChromeDriver(capabilities); 
  </code></pre>