Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chrome save password dialog after logging in making tests timeout #4145

Closed
jmanlapid opened this issue Mar 10, 2017 · 2 comments
Closed

Chrome save password dialog after logging in making tests timeout #4145

jmanlapid opened this issue Mar 10, 2017 · 2 comments

Comments

@jmanlapid
Copy link

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.

@karan-kang
Copy link

karan-kang commented Mar 10, 2017

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
              }
          }
      }
  }

@jmanlapid
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants