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
chrome://version
is your friend - by using it you can see what is your current profile path.
I'm using 2.46.1
on Windows8 machine and after wasting (investing) a few hours of my time I realised that Default
is appended by default.
So in order to use my another profile - "Profile 1" - I have to copy it somewhere and place it under Default
directory.
Not sure if that's a bug or a feature.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.