Protractor E2E angular "angular could not be found on the window"

Oleksandr Verhun picture Oleksandr Verhun · Jan 29, 2015 · Viewed 26k times · Source

I have a strange error after running my tests in angular project Error: Error while waiting for Protractor to sync with the page: "angular could not be found on the window". My Protractor configuration looks like this:

require('coffee-script').register();

exports.config = {
  seleniumServerJar: './node_modules/protractor/selenium/selenium-server-standalone-2.39.0.jar',
  seleniumAddress: 'http://localhost:4444/wd/hub',

  capabilities: {
    browserName: 'chrome'
    //'chromeOptions': {
    //  'args': ['--disable-extensions']
    //}
  },

  specs: [
    '*_spec.coffee'
  ],

  allScriptsTimeout: 10000000000,
  baseUrl: 'http://localhost:9003/',

  jasmineNodeOpts: {
    isVerbose: false,
    showColors: true,
    includeStackTrace: true,
    defaultTimeoutInterval: 10000000000
  }
};

And test:

loginPage = require './pages/log_in_page'

describe 'Log In', ->

      it 'shows after login', ->
        loginPage()
        .setEmail('[email protected]')
        .setPass('a46s75d4as765d4a6s7d54as76d5as74das76d5')

Get info from page:

module.exports = ->
      @email = element By.css '.test-i-login'
      @password = element By.css '.test-i-password'

      @setEmail = (name) =>
        @email.sendKeys(name)
        this

      @setPass = (number) =>
        @password.sendKeys(number)
        this
      this

There're some similar issues on github, but there I didn't find a solution working for me. Thx for answering.

Answer

mms27 picture mms27 · Apr 21, 2015

Changing framework option in Protractor config to 'jasmine2' fixed this issue for me.

See this thread for further information.