Open GoogleCodeExporter opened 9 years ago
I am not able to reproduce the issue with latest version of chrome driver 2.14
Can you please try with the latest version?
Code-
ChromeOptions options = new ChromeOptions();
options.addArguments("user-data-dir=/usr/local/google/home/gmanikpure/Documents/
profile");
WebDriver driver = new ChromeDriver(options);
driver.get("chrome://version"); // => Here i can see the correct profile path
Thread.sleep(5000);
driver.get("chrome://settings"); // => Here i see the correct preferences
enabled
Original comment by gmanikp...@chromium.org
on 6 Apr 2015 at 5:46
summer2014.lee@
if profile path is not correctly specified in {user-data-dir=} then driver will
create new profile with mentioned name.
are you adding options.setBinary ("path to your chrome.exe")? to locate
downloaded version of chrome.
can you try with this simple script and let us know if issue reproduces.
and what do you mean by "it is expected to open a default browser with user
data, but exactly open a clean browser."
ChromeOptions options1 = new ChromeOptions();
options1.addArguments("--user-data-dir=C:\\Users\\name\\AppData\\Local\\Google\\
Chrome\\User Data\\Default");
ChromeDriver driver1 = new ChromeDriver(options1);
driver1.get("https://google.com");
Original comment by agau...@chromium.org
on 5 May 2015 at 11:45
summer2014.lee@
can you please reply to comment#2
Original comment by agau...@chromium.org
on 28 May 2015 at 12:23
so sorry that I haven't logined my gmail until now.
my purpose is: when I logined some website the first time, I let the
browser remenber my username and password; when I open the website the
second time, I don't need to input my username and password. it is useful
for the automated testing when the website requires you to input a CAPTCHA,
because it makes you login derectly without input username and password.
my code is:
String userProfile= "C:\\Users\\heiq\\AppData\\Local\\Google\\Chrome\\User
Data";
ChromeOptions options = new ChromeOptions();
options.addArguments("user-data-dir="+userProfile);
ChromeDriver driver = new ChromeDriver(options);
driver.get("chrome://settings");
when I close all the chrome browser, it works; when I leave a default
chrome browser open, it can't open the browser which remenbers my username
and password.
plz forgive my for my poor English.
Where there is a will there is a way.
Summer Lee
2015-05-28 20:23 GMT+08:00 <chromedriver@googlecode.com>:
Original comment by summer20...@gmail.com
on 31 May 2015 at 2:25
You need to add Profile argument :- options.addArguments("--profile-directory=
Profile 1");
Login in Profile 1 with your test gamil id and save userid and password, Form
autofill data etc.. with this argument you can open same profile/browser which
remember username and password.
String userProfile= "C:\\Users\\heiq\\AppData\\Local\\Google\\Chrome\\User
ChromeOptions options = new ChromeOptions();
options.addArguments("--user-data-dir="+userProfile);
options.addArguments("--profile-directory= Profile 1");
ChromeDriver driver = new ChromeDriver(options);
driver.get("chrome://version");
Let us know the result thanks.
Original comment by agau...@chromium.org
on 26 Jun 2015 at 11:11
summer2014.lee
If we do not have multiple profiles we can ignore --profile-directory and
mention --user-data-dir='C:/Users/<user>/AppData/Local/Google/Chrome/User
Data', which takes default profile in the user data directory.
If we have multiple profiles in same user data directory, we need to specify
which profile we want using --profile-directory='Profile 1'
can you please verify and let us know if you still facing the issue with latest
chromedriver:2.16
Original comment by ssudunag...@chromium.org
on 20 Jul 2015 at 8:04
Original issue reported on code.google.com by
summer20...@gmail.com
on 5 Apr 2015 at 5:03