Git Product home page Git Product logo

protractor-demo's Introduction

protractor-demo

Demo test application and protractor tests.

Setup

git clone https://github.com/juliemr/protractor-demo.git
cd protractor-demo
npm install

To run

Get ChromeDriver set up: Run ./node_modules/.bin/webdriver-manager update.

Start the test application server with node app/expressserver.js Or if you're feeling lazy, just npm start.

Run the tests with node_modules/.bin/protractor test/conf.js Or if you're feeling lazy, just npm test.

Watch them go!

protractor-demo's People

Contributors

gion avatar hankduan avatar juliemr avatar sdenel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

protractor-demo's Issues

FirefoxProfile isn't working

I am running howtos/setFirefoxProfile/conf.js and during wait period trying to open new tab.
New tab is not showing angular.org page. It means not able to set profile.

Also getting below error -

apps@apps-thinkpad-w530:~/Downloads/UStax/protractor-demo-master$ ./node_modules/protractor/bin/protractor howtos/setFirefoxProfile/conf.js

Starting selenium standalone server...
[launcher] Running 1 instances of WebDriver
Selenium standalone server started at http://10.97.123.140:32825/wd/hub

/home/apps/Downloads/UStax/protractor-demo-master/node_modules/protractor/node_modules/selenium-webdriver/lib/atoms/error.js:113
var template = new Error(this.message);
^
UnknownError: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:
browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}
1467886981535 addons.xpi INFO Mapping [email protected] to /usr/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/[email protected]
1467886981535 addons.xpi DEBUG checkForChanges
1467886981536 addons.xpi DEBUG Loaded add-on state from prefs: {"app-profile":{"[email protected]":{"d":"/tmp/anonymous8110263991387900314webdriver-profile/extensions/[email protected]","e":false,"v":"2.45.0","st":1467886970000,"mt":1467886970000}},"app-global":{"{972ce4c6-7e08-4474-a285-3208198ce6fd}":{"d":"/usr/lib/firefox/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}","e":true,"v":"44.0","st":1454042676000,"mt":1453731169000}},"app-system-share":{"[email protected]":{"d":"/usr/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/[email protected]","e":false,"v":"3.2","st":1442597167000}}}
1467886981537 addons.xpi DEBUG Existing add-on [email protected] in app-profile
1467886981537 addons.xpi DEBUG getModTime: Recursive scan of {972ce4c6-7e08-4474-a285-3208198ce6fd}
1467886981538 addons.xpi DEBUG Existing add-on {972ce4c6-7e08-4474-a285-3208198ce6fd} in app-global
1467886981538 addons.xpi DEBUG Existing add-on [email protected] in app-system-share
1467886981538 addons.xpi DEBUG getInstallState changed: false, state: {"app-profile":{"[email protected]":{"d":"/tmp/anonymous8110263991387900314webdriver-profile/extensions/[email protected]","e":false,"v":"2.45.0","st":1467886970000,"mt":1467886970000}},"app-global":{"{972ce4c6-7e08-4474-a285-3208198ce6fd}":{"d":"/usr/lib/firefox/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}","e":true,"v":"44.0","st":1454042676000,"mt":1453731169000}},"app-system-share":{"[email protected]":{"d":"/usr/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/[email protected]","e":false,"v":"3.2","st":1442597167000}}}
1467886981540 addons.xpi DEBUG No changes found
1467886981547 addons.manager DEBUG Registering shutdown blocker for XPIProvider
1467886981549 addons.manager DEBUG Provider finished startup: XPIProvider
1467886981549 addons.manager DEBUG Starting provider: LightweightThemeManager
1467886981549 addons.manager DEBUG Registering shutdown blocker for LightweightThemeManager
1467886981550 addons.manager DEBUG Provider finished startup: LightweightThemeManager
1467886981551 addons.manager DEBUG Starting provider: GMPProvider
1467886981564 addons.manager DEBUG Registering shutdown blocker for GMPProvider
1467886981565 addons.manager DEBUG Provider finished startup: GMPProvider
1467886981565 addons.manager DEBUG Starting provider: PluginProvider
1467886981565 addons.manager DEBUG Registering shutdown blocker for PluginProvider
1467886981566 addons.manager DEBUG Provider finished startup: PluginProvider
1467886981567 addons.manager DEBUG Completed startup sequence
1467886981667 addons.xpi-utils DEBUG Starting async load of XPI database /tmp/anonymous8110263991387900314webdriver-profile/extensions.json
*** Blocklist::_loadBlocklistFromFile: blocklist is disabled
1467886981787 addons.manager DEBUG Starting provider:
1467886981787 addons.manager DEBUG Registering shutdown blocker for
1467886981788 addons.manager DEBUG Provider finished startup:
1467886982148 addons.xpi-utils DEBUG Async JSON file read took 0 MS
1467886982148 addons.xpi-utils DEBUG Finished async read of XPI database, parsing...
1467886982194 addons.xpi-utils DEBUG Successfully read XPI database
1467886982338 addons.manager DEBUG Starting provider: PreviousExperimentProvider
1467886982338 addons.manager DEBUG Registering shutdown blocker for PreviousExperimentProvider
1467886982338 addons.manager DEBUG Provider finished startup: PreviousExperimentProvider
JavaScript warning: https://normandy.cdn.mozilla.net/static/js/bundles/selfrepair-7575f6d27445b45bcffb.js, line 9825: mutating the [[Prototype]] of an object will cause your code to run very slowly; instead create the object with the correct initial [[Prototype]] value using Object.create

at new bot.Error (/home/apps/Downloads/UStax/protractor-demo-master/node_modules/protractor/node_modules/selenium-webdriver/lib/atoms/error.js:113:18)
at Object.bot.response.checkResponse (/home/apps/Downloads/UStax/protractor-demo-master/node_modules/protractor/node_modules/selenium-webdriver/lib/atoms/response.js:106:9)
at /home/apps/Downloads/UStax/protractor-demo-master/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:158:24
at [object Object].promise.ControlFlow.runInFrame_ (/home/apps/Downloads/UStax/protractor-demo-master/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:1877:20)
at [object Object].promise.Callback_.goog.defineClass.notify (/home/apps/Downloads/UStax/protractor-demo-master/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:2464:25)
at [object Object].promise.Promise.notify_ (/home/apps/Downloads/UStax/protractor-demo-master/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:563:12)
at Array.forEach (native)
at Object.goog.array.forEach (/home/apps/Downloads/UStax/protractor-demo-master/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/array/array.js:203:43)
at [object Object].promise.Promise.notifyAll_ (/home/apps/Downloads/UStax/protractor-demo-master/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:552:16)
at goog.async.run.processWorkQueue (/home/apps/Downloads/UStax/protractor-demo-master/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/async/run.js:125:21)

From: Task: WebDriver.createSession()
at Function.webdriver.WebDriver.acquireSession_ (/home/apps/Downloads/UStax/protractor-demo-master/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:155:22)
at Function.webdriver.WebDriver.createSession (/home/apps/Downloads/UStax/protractor-demo-master/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:129:30)
at [object Object].Builder.build (/home/apps/Downloads/UStax/protractor-demo-master/node_modules/protractor/node_modules/selenium-webdriver/builder.js:416:22)
at [object Object].DriverProvider.getNewDriver (/home/apps/Downloads/UStax/protractor-demo-master/node_modules/protractor/lib/driverProviders/driverProvider.js:38:7)
at [object Object].Runner.createBrowser (/home/apps/Downloads/UStax/protractor-demo-master/node_modules/protractor/lib/runner.js:180:37)
at /home/apps/Downloads/UStax/protractor-demo-master/node_modules/protractor/lib/runner.js:268:21
at _fulfilled (/home/apps/Downloads/UStax/protractor-demo-master/node_modules/q/q.js:797:54)
at self.promiseDispatch.done (/home/apps/Downloads/UStax/protractor-demo-master/node_modules/q/q.js:826:30)
at Promise.promise.promiseDispatch (/home/apps/Downloads/UStax/protractor-demo-master/node_modules/q/q.js:759:13)
at /home/apps/Downloads/UStax/protractor-demo-master/node_modules/q/q.js:573:44
[launcher] Process exited with error code 1

Protractor version - 2.1.0
Firefox - 44
Selenium-webdriver - 2.45.0

Note able to launch the test app.

Getting the below error,

c:\Temp\protractor-demo-master\protractor-demo-master\app>node expressserver.js

module.js:340
throw err;
^
Error: Cannot find module 'express'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (c:\Temp\protractor-demo-master\protractor-demo-master\app\expressserver.js:1:77)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)

protractor-demo to use directConnect

As far as I understand, all protractor configs used in the protractor-demo are using either chrome of firefox, which means that directConnect: true can be used. As a benefit, less setup to try out the demo and howtos. Thanks.

Protractor headless test fails using phantomjs 1.9.7 in Angularjs

Protractor tests failed when I run it in headless tests using phantomjs 1.9.7.

Here are the error messages:
Selenium standalone server started at http://192.168.1.156:4444/wd/hub
Scenario 1: A user can view the login page.
should redirect to the login page - pass
Scenario 2: A user logins using valid username and password.
should accepts valid username and password - fail

Failures:

  1. Scenario 2: A user logins using valid username and password. should accepts valid username and password
    Message:
    Expected 'http://localhost:8080/app/#/login?ref=%2Fdashboard' to contain '/dashboard'.
    Stacktrace:
    Error: Failed expectation
    at null. (/home/user/workspace/whitelabel/web-app/app/js/test/LoginSpec.js:20:37)

  2. Scenario 2: A user logins using valid username and password. should accepts valid username and password
    Message:
    Error: No element found using locator: By.linkText("Settings")
    Stacktrace:
    Error: No element found using locator: By.linkText("Settings")
    ==== async task ====
    Asynchronous test function: it()
    Error
    at null. (/home/user/workspace/whitelabel/web-app/app/js/test/LoginSpec.js:15:3)
    at Object. (/home/user/workspace/whitelabel/web-app/app/js/test/LoginSpec.js:14:1)

  3. Scenario 2: A user logins using valid username and password. should accepts valid username and password
    Message:
    UnknownError: {"errorMessage":"Element is not currently visible and may not be manipulated","request":{"headers":{"Accept-Encoding":"gzip,deflate","Connection":"Keep-Alive","Content-Length":"27","Content-Type":"application/json; charset=utf-8","Host":"localhost:29766","User-Agent":"Apache-HttpClient/4.3.2 (java 1.5)"},"httpVersion":"1.1","method":"POST","post":"{"id":":wdc:1410413286331"}","url":"/click","urlParsed":{"anchor":"","query":"","file":"click","directory":"/","path":"/click","relative":"/click","port":"","host":"","password":"","user":"","userInfo":"","authority":"","protocol":"","source":"/click","queryKey":{},"chunks":["click"]},"urlOriginal":"/session/66a8b700-3974-11e4-bd36-35d30e8383e9/element/%3Awdc%3A1410413286331/click"}}
    Build info: version: '2.42.2', revision: '6a6995d', time: '2014-06-03 17:42:03'
    System info: host: 'micmic.suarez', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '3.8.0-38-generic', java.version: '1.7.0_55'
    Driver info: driver.version: unknown

This is my test code:
describe('Scenario 1: A user can view the login page.', function() {
var loginUrl;

it('should redirect to the login page', function() {
browser.get('http://localhost:8080/app/');
loginUrl = browser.getCurrentUrl();
expect(browser.getCurrentUrl()).toEqual(loginUrl);
expect(browser.getCurrentUrl()).toContain('/login');
});
}, 100000);

describe('Scenario 2: A user logins using valid username and password.', function() {
it('should accepts valid username and password', function() {
browser.findElement(protractor.By.id('username')).sendKeys('micmic');
browser.findElement(protractor.By.id('password')).sendKeys('password');
browser.findElement(protractor.By.id('submit')).click();
browser.sleep(1000);
expect(browser.getCurrentUrl()).toContain('/dashboard');
browser.findElement(protractor.By.linkText('Settings')).click();
browser.sleep(1000);
browser.findElement(protractor.By.linkText('Branding')).click();
browser.sleep(1000);
browser.findElement(protractor.By.linkText('sss')).click();
browser.sleep(1000);
});

afterEach(function() {
browser.findElement(by.id('logout')).then(function(elem) {
elem.click();
});
browser.sleep(10000);
});
}, 10000);

This is my code in conf.js:
// conf.js
exports.config = {
// seleniumAddress: 'http://localhost:4444/wd/hub',
seleniumServerJar: 'selenium-server-standalone-2.40.0.jar',
seleniumPort: 4444,
// seleniumArgs:''
specs: ['LoginSpec.js'],

capabilities: {
browserName: 'phantomjs',
version: '',
platform: 'ANY'
},

// ----- More information for your tests ----
// baseUrl: 'http://monopond.org:8080',
framework: 'jasmine',
onPrepare: function() {
// At this point, global 'protractor' object will be set up, and
// jasmine will be available.
},
allScriptsTimeout: 99999,
jasmineNodeOpts: {
isVerbose: true,
showColors: true,
includeStackTrace: true,
defaultTimeoutInterval: 30000
}
};

Working version of custom firefox profile

The current example of using a custom firefox profile does not work.
The main issue is that it sets .firefox_profile instead of .moz:firefoxOptions.profile.

I created a helper that loads and encodes an existing profile, and returns a Promise:
firefox-profile-loader.js

const Promise = require('bluebird');
const FirefoxProfile = require('firefox-profile');

module.exports = {
    getEncoded
};

function getEncoded({ profileDirectory, destinationDirectory }) {
    return copy({ profileDirectory, destinationDirectory })
        .then(encode);
}

function copy({ profileDirectory, destinationDirectory }) {
    return new Promise((resolve, reject) => {
        FirefoxProfile.copy({
            profileDirectory,
            destinationDirectory
        }, (error, profile) => error ? reject(error) : resolve(profile));
    });
}

function encode(profile) {
    return new Promise((resolve, reject) => {
        profile.encoded((error, profile) => error ? reject(error) : resolve(profile));
    });
}

Example usage:

const path = require('path');
const firefoxProfileLoader = require('./firefox-profile-loader');

exports.config = {
    directConnect: true,
    specs: [
      'spec.js'
    ],
    framework: 'jasmine2',
    getMultiCapabilities: () => firefoxProfileLoader
        .getEncoded({
            profileDirectory: path.resolve(__dirname, '../firefox-profile'),
            destinationDirectory: path.resolve(__dirname, '../../tmp/firefox-profile')
        })
        .then(encodedProfile => {
            const capabilities = {
                'browserName': 'firefox',
                'moz:firefoxOptions': {
                    profile: encodedProfile,
                    args: ['--headless']
                }
            };
            return [capabilities];
        })

Update for Protractor v3.x.x

Hello.

Is it possible to update the examples to Protractor v3.x.x?

For example, the code in ScreenshotReporter does not work there.

Although I haven't tested it thoroughly, those changed made it work:

// var originalAddMatcherResult = jasmine.Spec.prototype. addMatcherResult;
var originalAddMatcherResult = jasmine.Spec.prototype.addExpectationResult;
jasmine.Spec.prototype.addExpectationResult = function() {
    ++index;
        // if (!arguments[0].passed()) {
    if (!arguments[1].passed) {
        screenshot(this.description, index);
    }
    return originalAddMatcherResult.apply(this, arguments);
};

Thank you

Screenshot reporter doesn't wait for last screenshot before quitting

Using this reporter, sometimes Protractor exits before the takeScreenshot() promise is resolved. This causes the last test to occasionally not have a screenshot generated.

My guess would be that _teardownEnv() or the driver's quit() are not chaining onto the last browser action's promise, but I'm unsure. Do you have any ideas why this would happen?

It seems to be a race condition. It only happens sometimes and I've only seen it happen with Firefox (I've tried with Firefox and Chrome)

Not able to run the tests on browserstack

I'm using the following configuration

exports.config = {
  'specs': [ 'spec.js' ],
  'seleniumAddress': 'http://hub-cloud.browserstack.com/wd/hub',

  'capabilities': {
    'browserstack.user': 'xxxxxxx',
    'browserstack.key': 'xxxxxxxx',
    'build': 'protractor-browserstack',
    'name': 'single_test',
    'browserName': 'chrome',
    'resolution': '1024x768',
    'browserstack.debug': 'true'
  }
};

its working for another project but when I try to run in the protractor-demo i get the following errors, not sure if there is something wrong with my setup...

> C:\DEV\Angular2UnitTestsProjects\protractor-demo>npm test

> [email protected] test C:\DEV\Angular2UnitTestsProjects\protractor-demo
> protractor test/conf.js

[17:41:56] I/hosted - Using the selenium server at http://hub-cloud.browserstack.com/wd/hub
[17:41:56] I/launcher - Running 1 instances of WebDriver
Started
FFF

Failures:
1) slow calculator should add numbers
  Message:
    Failed: Angular could not be found on the page http://localhost:3456/ : retries looking for angular exceeded
  Stack:
    Error: Angular could not be found on the page http://localhost:3456/ : retries looking for angular exceeded
        at C:\Users\duartda\AppData\Roaming\npm\node_modules\protractor\built\browser.js:504:23
        at ManagedPromise.invokeCallback_ (C:\Users\duartda\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:1379:14)
        at TaskQueue.execute_ (C:\Users\duartda\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2913:14)
        at TaskQueue.executeNext_ (C:\Users\duartda\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2896:21)
        at C:\Users\duartda\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2775:27
        at C:\Users\duartda\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:639:7
        at process._tickCallback (node.js:369:9)
    From: Task: Run beforeEach in control flow
        at Object.<anonymous> (C:\Users\duartda\AppData\Roaming\npm\node_modules\protractor\node_modules\jasminewd2\index.js:79:14)
    From asynchronous test:
    Error
        at Suite.<anonymous> (C:\DEV\Angular2UnitTestsProjects\protractor-demo\test\spec.js:2:3)
        at Object.<anonymous> (C:\DEV\Angular2UnitTestsProjects\protractor-demo\test\spec.js:1:1)
        at Module._compile (module.js:409:26)
        at Object.Module._extensions..js (module.js:416:10)
        at Module.load (module.js:343:32)
        at Function.Module._load (module.js:300:12)
  Message:
    Failed: Error while waiting for Protractor to sync with the page: "window.angular is undefined.  This could be either because this is a non-angular page or because your test involves client-side navigation, which can interfere with Protractor's bootstrapping.
 See http://git.io/v4gXM for details"
  Stack:
    Error: Error while waiting for Protractor to sync with the page: "window.angular is undefined.  This could be either because this is a non-angular page or because your test involves client-side navigation, which can interfere with Protractor's bootstrapping.
See http://git.io/v4gXM for details"
        at C:\Users\duartda\AppData\Roaming\npm\node_modules\protractor\built\browser.js:270:23
        at ManagedPromise.invokeCallback_ (C:\Users\duartda\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:1379:14)
        at TaskQueue.execute_ (C:\Users\duartda\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2913:14)
        at TaskQueue.executeNext_ (C:\Users\duartda\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2896:21)
        at C:\Users\duartda\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2775:27
        at C:\Users\duartda\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:639:7
        at process._tickCallback (node.js:369:9)Error
        at ElementArrayFinder.applyAction_ (C:\Users\duartda\AppData\Roaming\npm\node_modules\protractor\built\element.js:396:27)
        at ElementArrayFinder._this.(anonymous function) [as sendKeys] (C:\Users\duartda\AppData\Roaming\npm\node_modules\protractor\built\element.js:99:30)
        at ElementFinder.(anonymous function) [as sendKeys] (C:\Users\duartda\AppData\Roaming\npm\node_modules\protractor\built\element.js:730:22)
        at Object.<anonymous> (C:\DEV\Angular2UnitTestsProjects\protractor-demo\test\spec.js:7:32)
        at C:\Users\duartda\AppData\Roaming\npm\node_modules\protractor\node_modules\jasminewd2\index.js:94:23
        at new ManagedPromise (C:\Users\duartda\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:1082:7)
        at controlFlowExecute (C:\Users\duartda\AppData\Roaming\npm\node_modules\protractor\node_modules\jasminewd2\index.js:80:18)
        at TaskQueue.execute_ (C:\Users\duartda\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2913:14)
        at TaskQueue.executeNext_ (C:\Users\duartda\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2896:21)
        at C:\Users\duartda\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2820:25
    From: Task: Run it("should add numbers") in control flow
        at Object.<anonymous> (C:\Users\duartda\AppData\Roaming\npm\node_modules\protractor\node_modules\jasminewd2\index.js:79:14)
        at C:\Users\duartda\AppData\Roaming\npm\node_modules\protractor\node_modules\jasminewd2\index.js:103:16
        at ManagedPromise.invokeCallback_ (C:\Users\duartda\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:1379:14)
        at TaskQueue.execute_ (C:\Users\duartda\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2913:14)
        at TaskQueue.executeNext_ (C:\Users\duartda\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2896:21)
    From asynchronous test:
    Error
        at Suite.<anonymous> (C:\DEV\Angular2UnitTestsProjects\protractor-demo\test\spec.js:6:3)
        at Object.<anonymous> (C:\DEV\Angular2UnitTestsProjects\protractor-demo\test\spec.js:1:1)
        at Module._compile (module.js:409:26)
        at Object.Module._extensions..js (module.js:416:10)
        at Module.load (module.js:343:32)
        at Function.Module._load (module.js:300:12)

2) slow calculator memory should start out with an empty memory
  Message:
    Failed: Angular could not be found on the page http://localhost:3456/ : retries looking for angular exceeded
  Stack:
    Error: Angular could not be found on the page http://localhost:3456/ : retries looking for angular exceeded
        at C:\Users\duartda\AppData\Roaming\npm\node_modules\protractor\built\browser.js:504:23
        at ManagedPromise.invokeCallback_ (C:\Users\duartda\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:1379:14)
        at TaskQueue.execute_ (C:\Users\duartda\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2913:14)
        at TaskQueue.executeNext_ (C:\Users\duartda\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2896:21)
        at C:\Users\duartda\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2775:27
        at C:\Users\duartda\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:639:7
        at process._tickCallback (node.js:369:9)
    From: Task: Run beforeEach in control flow
        at Object.<anonymous> (C:\Users\duartda\AppData\Roaming\npm\node_modules\protractor\node_modules\jasminewd2\index.js:79:14)
    From asynchronous test:
    Error
        at Suite.<anonymous> (C:\DEV\Angular2UnitTestsProjects\protractor-demo\test\spec.js:2:3)
        at Object.<anonymous> (C:\DEV\Angular2UnitTestsProjects\protractor-demo\test\spec.js:1:1)
        at Module._compile (module.js:409:26)
        at Object.Module._extensions..js (module.js:416:10)
        at Module.load (module.js:343:32)
        at Function.Module._load (module.js:300:12)
  Message:
    Failed: Error while waiting for Protractor to sync with the page: "window.angular is undefined.  This could be either because this is a non-angular page or because your test involves client-side navigation, which can interfere with Protractor's bootstrapping.
 See http://git.io/v4gXM for details"
  Stack:
    Error: Error while waiting for Protractor to sync with the page: "window.angular is undefined.  This could be either because this is a non-angular page or because your test involves client-side navigation, which can interfere with Protractor's bootstrapping.
See http://git.io/v4gXM for details"
        at C:\Users\duartda\AppData\Roaming\npm\node_modules\protractor\built\browser.js:270:23
        at ManagedPromise.invokeCallback_ (C:\Users\duartda\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:1379:14)
        at TaskQueue.execute_ (C:\Users\duartda\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2913:14)
        at TaskQueue.executeNext_ (C:\Users\duartda\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2896:21)
        at C:\Users\duartda\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2775:27
        at C:\Users\duartda\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:639:7
        at process._tickCallback (node.js:369:9)
    From: Task: Run it("should start out with an empty memory") in control flow
        at Object.<anonymous> (C:\Users\duartda\AppData\Roaming\npm\node_modules\protractor\node_modules\jasminewd2\index.js:79:14)
        at C:\Users\duartda\AppData\Roaming\npm\node_modules\protractor\node_modules\jasminewd2\index.js:16:5
        at ManagedPromise.invokeCallback_ (C:\Users\duartda\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:1379:14)
        at TaskQueue.execute_ (C:\Users\duartda\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2913:14)
        at TaskQueue.executeNext_ (C:\Users\duartda\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2896:21)
        at C:\Users\duartda\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2775:27
    From asynchronous test:
    Error
        at Suite.<anonymous> (C:\DEV\Angular2UnitTestsProjects\protractor-demo\test\spec.js:24:5)
        at Suite.<anonymous> (C:\DEV\Angular2UnitTestsProjects\protractor-demo\test\spec.js:16:3)
        at Object.<anonymous> (C:\DEV\Angular2UnitTestsProjects\protractor-demo\test\spec.js:1:1)

3) slow calculator memory should fill the memory with past results
  Message:
    Failed: Angular could not be found on the page http://localhost:3456/ : retries looking for angular exceeded
  Stack:
    Error: Angular could not be found on the page http://localhost:3456/ : retries looking for angular exceeded
        at C:\Users\duartda\AppData\Roaming\npm\node_modules\protractor\built\browser.js:504:23
        at ManagedPromise.invokeCallback_ (C:\Users\duartda\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:1379:14)
        at TaskQueue.execute_ (C:\Users\duartda\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2913:14)
        at TaskQueue.executeNext_ (C:\Users\duartda\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2896:21)
        at C:\Users\duartda\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2775:27
        at C:\Users\duartda\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:639:7
        at process._tickCallback (node.js:369:9)
    From: Task: Run beforeEach in control flow
        at Object.<anonymous> (C:\Users\duartda\AppData\Roaming\npm\node_modules\protractor\node_modules\jasminewd2\index.js:79:14)
    From asynchronous test:
    Error
        at Suite.<anonymous> (C:\DEV\Angular2UnitTestsProjects\protractor-demo\test\spec.js:2:3)
        at Object.<anonymous> (C:\DEV\Angular2UnitTestsProjects\protractor-demo\test\spec.js:1:1)
        at Module._compile (module.js:409:26)
        at Object.Module._extensions..js (module.js:416:10)
        at Module.load (module.js:343:32)
        at Function.Module._load (module.js:300:12)
  Message:
    Failed: Error while waiting for Protractor to sync with the page: "window.angular is undefined.  This could be either because this is a non-angular page or because your test involves client-side navigation, which can interfere with Protractor's bootstrapping.
 See http://git.io/v4gXM for details"
  Stack:
    Error: Error while waiting for Protractor to sync with the page: "window.angular is undefined.  This could be either because this is a non-angular page or because your test involves client-side navigation, which can interfere with Protractor's bootstrapping.
See http://git.io/v4gXM for details"
        at C:\Users\duartda\AppData\Roaming\npm\node_modules\protractor\built\browser.js:270:23
        at ManagedPromise.invokeCallback_ (C:\Users\duartda\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:1379:14)
        at TaskQueue.execute_ (C:\Users\duartda\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2913:14)
        at TaskQueue.executeNext_ (C:\Users\duartda\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2896:21)
        at C:\Users\duartda\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2775:27
        at C:\Users\duartda\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:639:7
        at process._tickCallback (node.js:369:9)Error
        at ElementArrayFinder.applyAction_ (C:\Users\duartda\AppData\Roaming\npm\node_modules\protractor\built\element.js:396:27)
        at ElementArrayFinder._this.(anonymous function) [as sendKeys] (C:\Users\duartda\AppData\Roaming\npm\node_modules\protractor\built\element.js:99:30)
        at ElementFinder.(anonymous function) [as sendKeys] (C:\Users\duartda\AppData\Roaming\npm\node_modules\protractor\built\element.js:730:22)
        at Object.<anonymous> (C:\DEV\Angular2UnitTestsProjects\protractor-demo\test\spec.js:32:13)
        at C:\Users\duartda\AppData\Roaming\npm\node_modules\protractor\node_modules\jasminewd2\index.js:94:23
        at new ManagedPromise (C:\Users\duartda\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:1082:7)
        at controlFlowExecute (C:\Users\duartda\AppData\Roaming\npm\node_modules\protractor\node_modules\jasminewd2\index.js:80:18)
        at TaskQueue.execute_ (C:\Users\duartda\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2913:14)
        at TaskQueue.executeNext_ (C:\Users\duartda\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2896:21)
        at C:\Users\duartda\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2820:25
    From: Task: Run it("should fill the memory with past results") in control flow
        at Object.<anonymous> (C:\Users\duartda\AppData\Roaming\npm\node_modules\protractor\node_modules\jasminewd2\index.js:79:14)
        at C:\Users\duartda\AppData\Roaming\npm\node_modules\protractor\node_modules\jasminewd2\index.js:16:5
        at ManagedPromise.invokeCallback_ (C:\Users\duartda\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:1379:14)
        at TaskQueue.execute_ (C:\Users\duartda\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2913:14)
        at TaskQueue.executeNext_ (C:\Users\duartda\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2896:21)
        at C:\Users\duartda\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2775:27
    From asynchronous test:
    Error
        at Suite.<anonymous> (C:\DEV\Angular2UnitTestsProjects\protractor-demo\test\spec.js:31:5)
        at Suite.<anonymous> (C:\DEV\Angular2UnitTestsProjects\protractor-demo\test\spec.js:16:3)
        at Object.<anonymous> (C:\DEV\Angular2UnitTestsProjects\protractor-demo\test\spec.js:1:1)

3 specs, 3 failures
Finished in 35.494 seconds
[17:42:40] I/launcher - 0 instance(s) of WebDriver still running
[17:42:40] I/launcher - chrome #01 failed 3 test(s)
[17:42:40] I/launcher - overall: 3 failed spec(s)
[17:42:40] E/launcher - Process exited with error code 1
npm ERR! Test failed.  See above for more details.

Contact

Julie,

I've been working in a project that we are using Angular and Protractor. I've just watched your meet up and was awesome.
I've already created some issues in protractor repo and did a pull request, then i'm very excited in improve that project.
Could you have some email or another contact way to we keep in touch or i can create issues each time i have some question or suggestion?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.