Read more

How to disable Chrome's save password bubble for Selenium tests

Arne Hartherz
April 26, 2017Software engineer at makandra GmbH

This is no longer relevant for current versions of Chrome/Chromium.
Password manager features are disabled when the "Chrome is being controlled by automated software" banner is shown.

When filling out forms in Selenium tests, Chrome shows the (usual) bubble, asking to store those credentials.

Illustration UI/UX Design

UI/UX Design by makandra brand

We make sure that your target audience has the best possible experience with your digital product. You get:

  • Design tailored to your audience
  • Proven processes customized to your needs
  • An expert team of experienced designers
Read more Show archive.org snapshot

While the bubble does not interfere with tests, it is annoying when debugging tests. Here are two ways to disable it:

Option 1: prefs

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)

Sadly, there are no command line switches for this.

Option 2: Incognito mode

Alternatively, use Incognito mode to make the bubble go away.

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

Note that Incognito mode may have other impacts.

Posted by Arne Hartherz to makandra dev (2017-04-26 13:44)