Skip to content
This repository was archived by the owner on Jul 29, 2024. It is now read-only.
This repository was archived by the owner on Jul 29, 2024. It is now read-only.

Failed: Error while waiting for Protractor to sync with the page: "window.getAllAngularTestabilities is not a function" #3178

Closed
@Shyam-Chen

Description

@Shyam-Chen

version: beta.17

// hello-world.ts
import { Component } from 'angular2/core';

@Component({
  selector: 'hello-world',
  template: `
    <button (click)="onClickMe()">Click Me</button>
    <p>{{ clickMessage }}</p>
  `
})
export class HelloWorldComponent {
  public clickMessage: string = '';

  onClickMe() {
    this.clickMessage = 'Hello Angular 2';
  }
}
// hello-world.e2e.js
describe('Hello World', function() {
  beforeEach(function() {
    browser.get('http://localhost:9876/');
    browser.ignoreSynchronization = false;
  });
  it('should have a content', function() {
    element(by.css('hello-world')).click();
    expect(element(by.css('hello-world p')).getText()).toEqual('Hello Angular 2');
  });
});
# protractor.conf.coffee
class Config
  @directConnect: true
  @specs: ['./src/**/*.e2e.js']
  @exclude: []
  @capabilities:
    browserName: 'chrome'
  @baseUrl: 'http://localhost:9876/'
  @onPrepare: ->
    SpecReporter = require 'jasmine-spec-reporter'
    jasmine.getEnv().addReporter new SpecReporter displayStacktrace: true
    browser.ignoreSynchronization = true
  @framework: 'jasmine2'
  @jasmineNodeOpts:
    isVerbose: false
    showColors: true
    includeStackTrace: false
  @useAllAngular2AppRoots: true

if process.env.TRAVIS
  Config.capabilities = browserName: 'firefox'

exports.config = Config

ChromeDriver

# messages
Using ChromeDriver directly...
[launcher] Running 1 instances of WebDriver
Spec started
Started

  Hello World
    ✗ should have a content
      - Failed: Error while waiting for Protractor to sync with the page: "windo
w.getAllAngularTestabilities is not a function"
F
**************************************************
*                    Failures                    *
**************************************************

1) Hello World should have a content
  - Failed: Error while waiting for Protractor to sync with the page: "window.ge
tAllAngularTestabilities is not a function"

Executed 1 of 1 spec (1 FAILED) in 15 secs.


Failures:
1) Hello World should have a content
  Message:
    Failed: Error while waiting for Protractor to sync with the page: "window.ge
tAllAngularTestabilities is not a function"
  Stack:
    Error: Failed: Error while waiting for Protractor to sync with the page: "wi
ndow.getAllAngularTestabilities is not a function"
        at D:\Angular2TS-Starter-Kit\node_modules\jasminewd2\index.js:101:16
        at Promise.invokeCallback_ (D:\Angular2TS-Starter-Kit\node_modules\selen
ium-webdriver\lib\promise.js:1329:14)
        at TaskQueue.execute_ (D:\Angular2TS-Starter-Kit\node_modules\selenium-w
ebdriver\lib\promise.js:2790:14)
        at TaskQueue.executeNext_ (D:\Angular2TS-Starter-Kit\node_modules\seleni
um-webdriver\lib\promise.js:2773:21)
        at D:\Angular2TS-Starter-Kit\node_modules\selenium-webdriver\lib\promise
.js:2652:27
        at D:\Angular2TS-Starter-Kit\node_modules\selenium-webdriver\lib\promise
.js:639:7
        at process._tickCallback (internal/process/next_tick.js:103:7)

1 spec, 1 failure
Finished in 15.345 seconds
[launcher] 0 instance(s) of WebDriver still running
[launcher] chrome #01 failed 1 test(s)
[launcher] overall: 1 failed spec(s)
[launcher] Process exited with error code 1

FirefoxDriver

mgechev/angular-seed#732

# messages
Using FirefoxDriver directly...
[launcher] Running 1 instances of WebDriver
Spec started
Started
  Hello World
    ✗ should have a content
      - Failed: Error while waiting for Protractor to sync with the page: "window.getAllAngularTestabilities is not a function"
F
**************************************************
*                    Failures                    *
**************************************************
1) Hello World should have a content
  - Failed: Error while waiting for Protractor to sync with the page: "window.getAllAngularTestabilities is not a function"
Executed 1 of 1 spec (1 FAILED) in 0.202 sec.
Failures:
1) Hello World should have a content
  Message:
    Failed: Error while waiting for Protractor to sync with the page: "window.getAllAngularTestabilities is not a function"
  Stack:
    Error: Failed: Error while waiting for Protractor to sync with the page: "window.getAllAngularTestabilities is not a function"
        at /home/travis/build/Shyam-Chen/Angular2TS-Starter-Kit/node_modules/jasminewd2/index.js:101:16
        at Promise.invokeCallback_ (/home/travis/build/Shyam-Chen/Angular2TS-Starter-Kit/node_modules/selenium-webdriver/lib/promise.js:1329:14)
        at TaskQueue.execute_ (/home/travis/build/Shyam-Chen/Angular2TS-Starter-Kit/node_modules/selenium-webdriver/lib/promise.js:2790:14)
        at TaskQueue.executeNext_ (/home/travis/build/Shyam-Chen/Angular2TS-Starter-Kit/node_modules/selenium-webdriver/lib/promise.js:2773:21)
        at asyncRun (/home/travis/build/Shyam-Chen/Angular2TS-Starter-Kit/node_modules/selenium-webdriver/lib/promise.js:2652:27)
        at /home/travis/build/Shyam-Chen/Angular2TS-Starter-Kit/node_modules/selenium-webdriver/lib/promise.js:639:7
        at process._tickCallback (internal/process/next_tick.js:103:7)
1 spec, 1 failure
Finished in 0.205 seconds
[launcher] 0 instance(s) of WebDriver still running
[launcher] firefox #01 failed 1 test(s)
[launcher] overall: 1 failed spec(s)
[launcher] Process exited with error code 1

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions