Protractor: Chrome save password dialog after logging in making tests timeout

Created on 10 Mar 2017  路  2Comments  路  Source: angular/protractor

mar-09-2017 21-47-02

  • Node Version: 6.9.1
  • Protractor Version: 5.1.1
  • Angular Version: 1.5.11
  • Browser(s): Chrome 57.0.2987.98 (64-bit)
  • Operating System and Version OS X El Capitan Version 10.11.6
  • Your protractor configuration file
const commonConfig = require('./protractor.common.conf.js')
const HtmlScreenshotReporter = require('protractor-jasmine2-screenshot-reporter')
const reporter = new HtmlScreenshotReporter({
  dest: '../test/screenshots',
  filename: 'my-live-answer-e2e-report.html'
})
const extend = require('util')._extend;

exports.config = {
  directConnect: true,

  capabilities: {
    'browserName': 'chrome'
  },

  beforeLaunch: () => {
    return new Promise((resolve) => {
      reporter.beforeLaunch(resolve)
    })
  },

  onPrepare: () => {
     var SpecReporter = require('jasmine-spec-reporter')
     jasmine.getEnv().addReporter(new SpecReporter({displayStacktrace: 'all'}))
     jasmine.getEnv().addReporter(reporter)

     global.isAngularSite = (flag) => {
       browser.ignoreSynchronization = !flag
    }
  },

  // Close the report after all tests finish
  afterLaunch: (exitCode) => {
    return new Promise((resolve) => {
      reporter.afterLaunch(resolve.bind(this, exitCode))
    })
  }
}

exports.config = extend(exports.config, commonConfig)

  • A relevant example test
    Login to any username/password site. When successfully logging in, the save password dialog appears.

  • Output from running the test
    Timeout because the test cannot do anything once the password manager appears

  • Steps to reproduce the bug
    Login to any username/password site. When successfully logging in, the save password dialog appears.

Most helpful comment

Add the following in your protractor config. This should disable the chrome password manager:
Tested on Windows 10, Chrome 57.

capabilities: { 'browserName': 'chrome', 'chromeOptions': { 'prefs': { 'credentials_enable_service': false, 'profile': { 'password_manager_enabled': false } } } }

All 2 comments

Add the following in your protractor config. This should disable the chrome password manager:
Tested on Windows 10, Chrome 57.

capabilities: { 'browserName': 'chrome', 'chromeOptions': { 'prefs': { 'credentials_enable_service': false, 'profile': { 'password_manager_enabled': false } } } }

I am running tests using an old version of https://github.com/teerapap/grunt-protractor-runner which has a very old version of protractor and also which uses an old version of the chrome driver. New version of chrome driver addresses this issue.

Latest Release: ChromeDriver 2.28

Supports Chrome v55-57

Changes include:
Fixes a bug which blocked ChromeDriver automation extension from loading and thereby causing window resizing/positioning & screenshot functionalities to break.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gamecheck80 picture gamecheck80  路  3Comments

andyman3693 picture andyman3693  路  3Comments

jmcollin78 picture jmcollin78  路  3Comments

rafalf picture rafalf  路  3Comments

mvolkmann picture mvolkmann  路  3Comments