I am new to Selenium and Webdriver. I am trying to write tests using Webdriverjs in node. I want selenium to load my default chrome profile. This is what I am trying, but it still loads a new chrome profile.
var webdriver = require('selenium-webdriver');
var chrome = require('selenium-webdriver/chrome');
var o = new chrome.Options();
o.addArguments("--user-data-dir=/Users/karnesh/Library/Application Support/Google/Chrome/Default");
var driver = new webdriver.Builder().withCapabilities(webdriver.Capabilities.chrome())
.setChromeOptions(o).build();
Any ideas where I am going wrong??
Also, I was not able to find a documentation for webdriverjs. Any links to it (if it exists) would be helpful . Thanks

--user-data-dir. Make sure you've got the right path. I installed Selenium 2.46.1."--user-data-dir=c:\\Users\\a-miste\\AppData\\Local\\Google\\Chrome\\User Data\\Default\\"(I'm on Windows8) and it still loads the new one...node scriptname.jsand then usingnode-inspectorI can see what are the values during execution: i.imgur.com/xcBn6wM.png - but still - new profile gets created everytime... (weird)node test.js. I'm on Linux though and you guys are on Windows. At any rate, this question here is a duplicate of that one. The answers there do not use the leading--.