Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

How to disable Chrome save password bubble for Selenium tests

How to disable Chrome save password bubble for Selenium tests

Each of us should is testing an app that has login and registration feature, I guess… So if thats the case you might observed in google chrome is asking you for saving the password after each successful  login or registration. Honestly for me is really annoying so I got to disabled it , if you share the same feeling here’s how to Disable Chrome’s save Password Bubble for Selenium tests.

There are 2 ways to disable it , first one is to set a browser profile and the second one to open the browser in incognito mode. I simply use the first one but if you feel the second works better for you just try it out.

First option: preference

You can set profile preferences to disable the password manager like so:

prefs = {
  'credentials_enable_service' => false,
  'profile.password_manager_enabled' => false
}

Capybara::Selenium::Driver.new(app, browser: :chrome, prefs: prefs)

There is a small disadvantage for using this option , there are no command line switches for this.

Second option: Open in Incognito mode

You can get the bubble away by just opening the browser in incognito mode.

Capybara::Selenium::Driver.new(app, browser: :chrome, args: %w[--incognito])

Incognito might do something else that will affect your tests so be careful before you do.

git push origin master

Happy Testing!

Ps if you enjoyed it why not reading more from selenium tips :

Ruby Capybara select random value from dropdown

How to use : Capybara get attribute

jQuery scroll to element

Introducing the Tellurium Selenium Automated Testing Framework

The post How to disable Chrome save password bubble for Selenium tests appeared first on TestingRepository.



This post first appeared on Testing Repository - Creating Testing, please read the originial post: here

Share the post

How to disable Chrome save password bubble for Selenium tests

×

Subscribe to Testing Repository - Creating Testing

Get updates delivered right to your inbox!

Thank you for your subscription

×