Launch chrome with "Offer to save passwords I enter on the web" option unchecked.

1,168 views
Skip to first unread message

Avikash Gorka

unread,
Jun 21, 2013, 7:29:55 AM6/21/13
to Selenium Users
Hi,

I need to launch chrome with "Offer to save passwords I enter on the web" option unchecked. I have already unchecked this manually many times. But when I try to launch chrome with webdriver, it becomes checked again.
The problem I am facing with this is that, if the option is checked, it always asks me "Do you want Google Chrome to save your password?"

Inline image 3


I need to perform mouseover action on Go to Link of this page. The code is running fine if this option doesn't come or I click in cross manually. But if stays there, code is unable to perform mouseover action on Go to.

I am using below code : 

for launching chrome : 
System.setProperty("webdriver.chrome.driver","\\chromedriver_win_23.0.1240.0\\chromedriver.exe");
DesiredCapabilities capability = DesiredCapabilities.chrome();
capability.setCapability("chrome.switches", Arrays.asList("--disable-extensions"));
capability.setCapability("chrome.binary", "C:/Documents and Settings/<userfolder>/Local Settings/Application Data/Google/Chrome/Application/chrome.exe");
ChromeOptions options = new ChromeOptions();
options.addArguments("user-data-dir=C:/Documents and Settings/<userfolder>/Local Settings/Application Data/Google/Chrome/User Data/Default");
capability.setCapability(ChromeOptions.CAPABILITY, options);
WebDriver driver= new ChromeDriver(capability);


for performing mouseover : 

WebElement we = driver.findElement(By.linkText("Go to"));
Actions builder = new Actions(driver);
builder.moveToElement(we).click(we);    
builder.perform();

The mouseover code is running fine for chrome/firefox unless that option is coming.


Thanks & Regards,

Avikash Gorka
Sr Test Engineer

image.png

Jon Valvano

unread,
Jun 21, 2013, 8:28:17 AM6/21/13
to seleniu...@googlegroups.com
This is a chrome feature that can be turned off.


Make sure the option, "Offer to save passwords I enter on the web", is unchecked.   

Regards



--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CAMTbUYg8dxXED%3D4cJ3RrzyV8LVjg%3Dmub54aNwFmiwj%2BU83GoXQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

image.png

Avikash Gorka

unread,
Jun 21, 2013, 10:05:01 AM6/21/13
to Selenium Users
Thanks Jon,

But I have already done that. If I am opening chrome manually, then "Offer to save passwords I enter on the web", is unchecked.  
But when I open chrome through webdriver, it is getting opened with this option checked by default. I want this thing be unchecked even with Webdriver. 


Thanks & Regards,

Avikash Gorka
Sr Test Engineer



image.png

Jon Valvano

unread,
Jun 21, 2013, 10:10:16 AM6/21/13
to seleniu...@googlegroups.com
I guess chrome is using a different profile.   

Lazy solution: Try opening the browser with your Se test then making the change in that browser's session.

More correct way is to see about specifying the profile though the start up.   

-j


image.png

Avikash Gorka

unread,
Jun 21, 2013, 10:34:10 AM6/21/13
to Selenium Users

On Fri, Jun 21, 2013 at 7:40 PM, Jon Valvano <jon.v...@gmail.com> wrote:
Try

Well, I do know about firefox profiling. But I am not sure about Chrome profiling. Is there any way we can  create chrome profile and use that profile all the time for launching chrome.

Avikash Gorka

unread,
Jun 22, 2013, 8:06:06 AM6/22/13
to Selenium Users
Any one has solution to this problem...???


Thanks & Regards,

Avikash Gorka
Sr Test Engineer



Vaibhav Misra

unread,
Jun 24, 2013, 10:32:29 AM6/24/13
to seleniu...@googlegroups.com
You can set Chrome Profile like this:

                        ChromeOptions options = new ChromeOptions();
options.addArguments("user-data-dir=C:/xyz/Default");
DesiredCapabilities capability = DesiredCapabilities.chrome();
capability.setCapability(ChromeOptions.CAPABILITY, options);

If Chrome is not able to locate a profile at the given location then it creates one of its own.

I also don't know how to make changes in this profile so looking forward to input from some expert

Jemilo II

unread,
Sep 10, 2015, 1:51:19 PM9/10/15
to Selenium Users
I just answered this @ http://stackoverflow.com/questions/16301457/webdriver-chrome-browser-avoid-do-you-want-chrome-to-save-your-password-pop-u/32507680#32507680

You need to set: (Using JSON format, change to your needs)
capabilities.chromeOptions.prefs.password_manager_enabled = false;
Reply all
Reply to author
Forward
0 new messages