Protractor: Failed: Error while waiting for Protractor to sync with the page: "angular could not be found on the window"

Created on 28 Jan 2015  ·  52Comments  ·  Source: angular/protractor

After updated Protaractor to 1.6.1 , webdriver , chromedriver, jasmine to 2.0, when i try to run my tests i got:

"Using ChromeDriver directly...
[launcher] Running 1 instances of WebDriver
Start test TC06_01_01_Binary_1_1
Started
Execute test TC06_01_01_Binary_1_1
Login as Admin
Execute script no 18
F

Failures:
1) TC06_01_01_Binary_1_1 TC06_01_01_Binary_1_1 Should be able to add record with different values
  Message:
    Failed: Error while waiting for Protractor to sync with the page: "angular could not be found on the window"
  Stack:
    Error: Failed: Error while waiting for Protractor to sync with the page: "angular could not be found on the window"
       at C:\Users\E2Euser\AppData\Roaming\npm\node_modules\protractor\node_modules\jasminewd2\index.js:104:1
6
        at C:\Users\E2Euser\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\go
og\base.js:1582:15
        at [object Object].webdriver.promise.ControlFlow.runInNewFrame_ (C:\Users\E2Euser\AppData\Roaming\npm\
node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver\promise.js:1654:20)
        at notify (C:\Users\E2Euser\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdrive
r\lib\webdriver\promise.js:465:12)
  Message:
    Failed: Error while waiting for Protractor to sync with the page: "angular could not be found on the windo
w"
  Stack:
    Error: Failed: Error while waiting for Protractor to sync with the page: "angular could not be found on th
e window"
        at C:\Users\E2Euser\AppData\Roaming\npm\node_modules\protractor\node_modules\jasminewd2\index.js:104:1
6
        at C:\Users\E2Euser\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\go
og\base.js:1582:15
        at [object Object].webdriver.promise.ControlFlow.runInNewFrame_ (C:\Users\E2Euser\AppData\Roaming\npm\
node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver\promise.js:1654:20)
        at notify (C:\Users\E2Euser\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdrive
r\lib\webdriver\promise.js:465:12)
  Message:
    Failed: Error while waiting for Protractor to sync with the page: "angular could not be found on the windo
w"
  Stack:
    Error: Failed: Error while waiting for Protractor to sync with the page: "angular could not be found on th
e window"
        at C:\Users\E2Euser\AppData\Roaming\npm\node_modules\protractor\node_modules\jasminewd2\index.js:104:1
6
        at C:\Users\E2Euser\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\go
og\base.js:1582:15
        at [object Object].webdriver.promise.ControlFlow.runInNewFrame_ (C:\Users\E2Euser\AppData\Roaming\npm\
node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver\promise.js:1654:20)
        at notify (C:\Users\E2Euser\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdrive
r\lib\webdriver\promise.js:465:12)

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

any idea why Angular cannot be found? or how should i fix this?

needs investigation

All 52 comments

I've actually had this exact same issue on OSX.

... snip ...
Running "connect:test" (connect) task
Started connect web server on http://localhost:9001

Running "protractor:run" (protractor) task
Using the selenium server at http://127.0.0.1:4444/wd/hub
[launcher] Running 1 instances of WebDriver
Uncaught exception: Error while waiting for Protractor to sync with the page: "angular could not be found on the window"
[launcher] Process exited with error code 1
>>
Fatal error: protractor exited with code: 1
... snip ...

After this, the instance of Chrome it had opened up remains open in a hung state.

I have the same problem today on Mac OS. After closed all terminals and browsers and reopen this error stop ( sor far at least ).

I am experiencing this as well with version 2.0.0.

even i'm facing the same issue.

On Wed, Apr 1, 2015 at 11:03 AM, Walter H. Roman [email protected]
wrote:

I am experiencing this as well with version 2.0.0.


Reply to this email directly or view it on GitHub
https://github.com/angular/protractor/issues/1760#issuecomment-88355894.

me too

same here, why is this issue closed?

downgrading to 1.8.0 fixed this issue-

Do you call browser.get() inside your onPrepare function? See #1978

I'm using browser.get(), but i don't think I'm using onPrepare, I'm running this example for angular todomvc - https://github.com/mknabe/angular-testing-starter/blob/master/test/e2e/scenarios.js

bump...

like @cm325 I am getting the "angular could not be found on the window" error when running 2.0.0 but downgrading to 1.8.0 fixes the issue

BUMP!

same issue after upgrading to v2.1.0, had to downgrade to 1.8.0 to fix the issue

Having this same problem also on OSX

Edited - Fixed

So I fixed this by changing the following code in one of my Page Constructors:

this.currentUrl =  browser.getCurrentUrl();

To

this.currentUrl = function(){
    return browser.getCurrentUrl();
  };

My tests were running fine and for no reason this showed up. I made no changes to the system or code to cause this. I cannot downgrade, I need 2.0. I did the last workaround for currentUrl and that does not help either. ANy help will be awesome..

I'm experienced the same at Monday. Last Friday everything was fine, then from Monday I cannot run any test because when the login page needs to be loaded, which is a non-Angular page, I get the same error. Tried to downgrade protractor to 1.8.0 and 1.4.0, nothing, tried to change the framework to 'jasmine2', again nothing, I'm not using browser.get in onPrepare. I haven't got more idea what can I try. Any other suggestions, what can I change or try? Thx!

I'm experiencing the same problem here too. :fist:bump for more attention.
Downgrading to 1.8.0 from 2.1.0 did not resolve it immediately...

I have the same problem. I just set up protractor with cucumber-js, chai and chai-as-promised. I have two very basic features testing against basic sample steps. I'm also using ES6 pre-transpiled and loaded with SystemJS. I can't find out how to consistently reproduce this problem. Although right now I can do it my changing one of my specific steps to intentionally fail. Not sure if it's being executed first/last or why it has to be that specific one.

Both step wrappers basically look like this:

var Promise = require('es6-promise').Promise;
var World = require("../support/world.js").World;

module.exports = function() {
    this.World = World;

    this.Given(/^Something exists$/, function() {
        browser.get('http://localhost:3000/');
        return Promise.all([
            expect(browser.getCurrentUrl()).to.eventually.equal('http://localhost:3000/#/dashboard'),
            expect(browser.getTitle()).to.eventually.equal('Dashboard')
        ]);
    });
};

Hi guys! We solved the problem in our project. But unfortunately I don't know exactly that the problem was with the protractor and jasmine-reporters versions or with something else. In some point in the test we wrote

element(by.id('logIn')).click().then(function (p) {
                browser.driver.wait(browser.driver.isElementPresent(by.id('Email')));
            });;

and some more like that, and these waits are solved the problem.
I know it's not the best to solve like this, but it is working for now and that was the first point, to make it working.

@Yok86 Just tried your fix and it worked! :+1:

This is tidier than our workaround too. We threw a browser.debugger() at the end of our onPrepare handler and that seemed to fix the timing issue at play, but I have no idea why. This is much cleaner.

browser.driver.findElement(by.xpath("//*[@id='submit']")).click().then(function(p) {
      browser.driver.wait(browser.driver.getTitle().then(function (title) {
        return title == 'AppName';
      }));
    });

Have the same issues:

Failed: Error while waiting for Protractor to sync with the page: "[ng:test] no injector found for element argument to getTestability\nhttp://errors.angularjs.org/1.4.5/ng/test"
Stack:
Error: Failed: Error while waiting for Protractor to sync with the page: "[ng:test] no injector found for element argument to getTestability\nhttp://errors.angularjs.org/1.4.5/ng/test"
at stack (c:\Program Filesnodejsnode_modules\protractornode_modules\jasmine-core\lib\jasmine-core\jasmine.js:1482:17)
at buildExpectationResult (c:\Program Filesnodejsnode_modules\protractornode_modules\jasmine-core\lib\jasmine-core\jasmine.js:1452:14)
at Spec.Env.expectationResultFactory (c:\Program Filesnodejsnode_modules\protractornode_modules\jasmine-core\lib\jasmine-core\jasmine.js:583:18)
at Spec.addExpectationResult (c:\Program Filesnodejsnode_modules\protractornode_modules\jasmine-core\lib\jasmine-core\jasmine.js:324:34)
at Suite.addExpectationResult (c:\Program Filesnodejsnode_modules\protractornode_modules\jasmine-core\lib\jasmine-core\jasmine.js:2123:38)
at Env.fail (c:\Program Filesnodejsnode_modules\protractornode_modules\jasmine-core\lib\jasmine-core\jasmine.js:894:25)
at Function.next.fail (c:\Program Filesnodejsnode_modules\protractornode_modules\jasmine-core\lib\jasmine-core\jasmine.js:1806:19)
at c:\Program Filesnodejsnode_modules\protractornode_modules\jasminewd2index.js:101:16
at [object Object].promise.ControlFlow.runInFrame_ (c:\Program Filesnodejsnode_modules\protractornode_modules\selenium-webdriver\lib\webdriver\promise.js:1877:20)
at [object Object].promise.Callback_.goog.defineClass.notify (c:\Program Filesnodejsnode_modules\protractornode_modules\selenium-webdriver\lib\webdriver\promise.js:2464:25)
at [object Object].promise.Promise.notify_ (c:\Program Filesnodejsnode_modules\protractornode_modules\selenium-webdriver\lib\webdriver\promise.js:563:12)
at Array.forEach (native)
at Object.goog.array.forEach (c:\Program Filesnodejsnode_modules\protractornode_modules\selenium-webdriver\lib\goog\array\array.js:203:43)
at [object Object].promise.Promise.notifyAll_ (c:\Program Filesnodejsnode_modules\protractornode_modules\selenium-webdriver\lib\webdriver\promise.js:552:16)
at goog.async.run.processWorkQueue (c:\Program Filesnodejsnode_modules\protractornode_modules\selenium-webdriver\lib\goog\async\run.js:125:21)
at process._tickCallback (node.js:356:9)

Same error here on OSX, when running wiht phantomjs. Works fine in Chrome

Error while waiting for Protractor to sync with the page: "[ng:test] http://errors.angularjs.org/1.4.3/ng/test"

Having the same issue here, it was working fine but now stopped working

I am also having this issue

+1 Last friday was working fine, for no reason is not working now

This is tricky. Can someone work on getting an isolated and reproducible test case? I haven't been able to reproduce this reliably on my own (although, to be honest, I haven't done a ton of digging yet).

To summarize some of the posts here, the error is present with:

  • Version: Protractor 2.x.x (besides the OP's issue in 1.6.x)
  • Frameworks: Jasmine 2
  • Browsers: Chrome and PhantomJS
  • Platforms: OSX and Windows
  • Angular/Non-Angular pages: ???

Which is quite broad unfortunately :(

@jessiahr @navarrojp @AndreasMaier would you be interested in helping debug this? We could use the gitter room to coordinate.

Same Issue:

  • Version: Protractor 2.5.1
  • Framework: Jasmine 2
  • Browsers: Chrome
  • Platform: OSX
  • Angular page

@mrzmyr thanks for the details. Would it be possible to get a config and an isolated example spec where you can reproduce this?

@NickTomlin I'd love to have a example spec or anything similar. It was not even possible for me to reproduce it in the same environment. Is looked like a timing issue for me.

I have the same issue, In my config i have an onPrepare and this line is in there.
browser.driver.get(targetUrl);

this error happens about 40% of the time. idk why.

jasmine 2.X.X

I'm getting the same issue as @mrzmyr:

Version: Latest version of Protractor
Framework: Jasmine 2
Browsers: Chrome
Platform: OSX
Angular page

I'm going to try downgrading to 1.8 to see if that resolves the issue. It's weird, as the tests were running yesterday.

There's a reproducible test case by following the tutorial here. The config/test case I've used are here for reference. The tutorial isn't the most accurate, however it does reproduce the issue for me.

[email protected]
Platform: OSX
Angular
Framework: Jasmine2
Browser: Chrome

This error message is usually caused because some sort of navigation was done using something other than browser.get. browser.get, in addition to changing the URL, waits for angular to load and bootstraps Protractor.

@61ue5peed your problem is that browser.driver.get does not provide the same synchronization and bootstrapping. In your cause I would just switch from browser.driver.get to browser.get

@jennapederson In your case I assume #becomeAwesome is a link, and by clicking on it you navigate without the synchronization and bootstrapping. In cases like yours I would just add a browser.refresh after you click the link.

Other reports seem to be similar, so I'm going to close this issue. If people can trigger this problem using a test which relies exclusively on borwser.get for navigation, I suggest they open a new issue

This issue is still reproducible in v 3.3.1.
I am using browser.get to navigate to my homepage and it fails on the first go.

Just to let you all know -> in my case the problem was a external angular module which loads the Facebook API....the facebook javascript accessed the dom structure within the angular app and tried to change it. I had to change the module to avoid loading the facebook script on testing

I get this issue as well. Not often but enough to be an problem. It's a regular Angular page, nothing external or non-angular about it. The test passes most of the time, but sometimes this error pops up and it fails. Seems it doesn't wait quite long enough for a modal to load. It's always on the same step/test.

Protractor: 3.2.2
Cucumber-protractor: 0.4.0

@drcjones
element(by.css(selector)).isPresent().then(function (result) {
if (result) {
element(by.css(selector)).click();
}
}, 20000);

Hi,

I encounter the same issue. I am trying to get the title of browser. Am I doing something wrong?

Failed: Angular could not be found on the page http://thetestroom.com/jsweba

pp/ : angular never provided resumeBootstrap
Stack:
Error: Angular could not be found on the page http://thetestroom.com/jswebap
p/ : angular never provided resumeBootstrap

` beforeEach(function() {

    browser.get('http://thetestroom.com/jswebapp/');
});

it('should test webpage title', function() {
    expect(browser.getTitle()).toEqual('Zoo Adoption | Home');
});`

Any feedback will be good.

I do not see you waiting for Angular or wait for any specific url change in browser or an element before you get the title. See if this helps.

browser.get(testUrl).then(function() {
browser.wait(function() {
return browser.getCurrentUrl().then(function(url) {
return /thetestroom/.test(url);
});
}, 10000);
});

We started seeing this problem intermittently in IE9. Upgrading from 3.2.1 to 3.3.0 stopped the errors.

Same here- upgrading from 3.2.1 to 3.3.0 fixed this for us

I have same error . using chrome. any suggestions is awesome. Thanks

config.js

exports.config = {
directConnect: true,
allScriptsTimeout: 1000,

// Capabilities to be passed to the webdriver instance.
capabilities: {
'browserName': 'chrome'
// 'browserName': 'firefox'
},

// Framework to use. Jasmine is recommended.
framework: 'jasmine',

// Spec patterns are relative to the current working directory when
// protractor is called.
// specs: ['example_spec.js'],
specs: ['*_spec.js'],

seleniumAddress: 'http://localhost:8080/McacApp/index.html',
baseUrl: 'http://localhost:8080/McacApp/index.html',

// protractor-conf.js
rootElement: '.mcacApp',
// Options to be passed to Jasmine.
jasmineNodeOpts: {
defaultTimeoutInterval: 30000,

baseUrl: 'http://localhost:8080/McacApp/index.html',
jasmineNodeOpts: {
  onComplete: null,
  isVerbose: false,
  showColors: true,
  includeStackTrace: false
}

}

};
example.spec.js

describe('Quick test', function() {

it('Should do something', function() {

    browser.get('http://localhost:8080/McacApp/index.html');
   element(by.model('ctrl.formData.emailAddress')).sendKeys('emailAddress');
  // element(by.model('ctrl.formData.employmentType')).sendKeys('employmentType');
  element(by.xpath("//button[text()='Confirm']")).click();
  browser.sleep(10000);


    //expect (element(by.xpath("//ui-view/div/div[2]/div[1]/a/div/p"))).toEqual("Manage users and teams.");
    //expect(element(by.xpath("//ui-view/div/div[2]/div[2]/a/div/p"))).toEqual("Define metrics that drive your business.");
    //expect(element(by.xpath("//ui-view/div/div[2]/div[3]/a/div/p"))).toEqual("Create and modify leaderboards that display metrics.");

});

});

@Karpo72 : Could you please provide your example for this issue for email and contact validation.

Error: Failed: Error while waiting for Protractor to sync with the page: "[ng:test] http://errors.angularjs.org/1.4.7/ng/test"

Thanks much appreciated.

@reddynr I do not see you wait for an element or anything after you .get() the page. You should. See examples above in this thread

In your case it should be
browser.get(..).then(function() { browser.driver.wait(browser.driver.isElementPresent(by.model('ctrl.formData.emailAddress'))); // all remaining sendKeys, submit and assert code here. });

@srajagopalan1712 Thanks for the feedback. but still getting same error. here is my implementation.

Thanks, much appreciated , if any suggestions.

describe('mcacapp', function() {
it('testing the email functionality', function()
{
browser.get('http://localhost:8080/McacApp/index.html').then(function() {
browser.wait(function() {
return browser.getCurrentUrl().then(function(url) {
return /thetestroom/.test(url);
});
}, 10000);

});
element(by.model('ctrl.formData.emailAddress')).sendKeys('[email protected]');
var greeting = element(by.binding('ctrl.formData.emailAddress'));
expect(greeting.getText()).toEqual('[email protected]');
});
});

instead of waiting for url to change, wait for the emailAddress element to be present as well. Also try browser.driver.wait and browser.driver.getCurrentUrl. Move all the other test code inside the get()...{} block as well.

@srajagopalan1712 Thanks for the feedback. But still getting same error. Could you please provide working example would be great helpful.

Thanks alot.

I see above that you have return /thetestroom/.test(url); in the code above. That was an example I gave for someone else for their url in an older response. Please change 'thetestroom' here to whatever your url will look like. You should have gotten wait time out here instead of angular issue.
Here is the code I have to solve this issue

 homepage.myButton.click().then(function() {
     browser.driver.wait(function() {
        return browser.driver.getCurrentUrl().then(function(url) {
          return url.includes('......'); // checks if the new url has what you are looking for in ...    
     }); // this waits until the url changes to whatever it should be in ....
    }, 25000, "URL hasn't changed").then(function() {
   // after url changed, in new page check these 
   // pec is protractor expected condition.
    // See http://www.protractortest.org/#/api?view=ProtractorExpectedConditions
     browser.wait(pec.visibilityOf(homepage.feedTitle), 20000); 
     expect(homepage.feedTitle.getText()).toContain('.....');
      expect(homepage.feedBody.getText()).toContain('.....');  
  });

@ saradha,

Thank you so much. Let me implement this way.

Narendra...!

On 7 October 2016 at 15:52, Saradha [email protected] wrote:

I see above that you have return /thetestroom/.test(url); in the code
above. That was an example I gave for someone else for their url in an
older response. Please change 'thetestroom' here to whatever your url will
look like. You should have gotten wait time out here instead of angular
issue.
Here is the code I have to solve this issue

homepage.myButton.click().then(function() {
browser.driver.wait(function() {
return browser.driver.getCurrentUrl().then(function(url) {
return url.includes('......'); // checks if the new url has what you are looking for in ...
}); // this waits until the url changes to whatever it should be in ....
}, 25000, "URL hasn't changed").then(function() {
// after url changed, in new page check these
// pec is protractor expected condition.
// See http://www.protractortest.org/#/api?view=ProtractorExpectedConditions
browser.wait(pec.visibilityOf(homepage.feedTitle), 20000);
expect(homepage.feedTitle.getText()).toContain('.....');
expect(homepage.feedBody.getText()).toContain('.....');
});


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/angular/protractor/issues/1760#issuecomment-252345767,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AViSFrR5k79AQWfZVEm6J1qTSEPvMjfnks5qxqMXgaJpZM4DYTza
.

@Saradha,

Thank you so much for feedback.

I am getting below error. Please advice if any workaround. Thank you.

running : npm run dev

Error: Cannot find module './internal/streams/BufferList'

Narendra...!

On 17 October 2016 at 16:48, narendra Reddy narendra.[email protected] wrote:

@ saradha,

Thank you so much. Let me implement this way.

Narendra...!

On 7 October 2016 at 15:52, Saradha [email protected] wrote:

I see above that you have return /thetestroom/.test(url); in the code
above. That was an example I gave for someone else for their url in an
older response. Please change 'thetestroom' here to whatever your url will
look like. You should have gotten wait time out here instead of angular
issue.
Here is the code I have to solve this issue

homepage.myButton.click().then(function() {
browser.driver.wait(function() {
return browser.driver.getCurrentUrl().then(function(url) {
return url.includes('......'); // checks if the new url has what you are looking for in ...
}); // this waits until the url changes to whatever it should be in ....
}, 25000, "URL hasn't changed").then(function() {
// after url changed, in new page check these
// pec is protractor expected condition.
// See http://www.protractortest.org/#/api?view=ProtractorExpectedConditions
browser.wait(pec.visibilityOf(homepage.feedTitle), 20000);
expect(homepage.feedTitle.getText()).toContain('.....');
expect(homepage.feedBody.getText()).toContain('.....');
});


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/angular/protractor/issues/1760#issuecomment-252345767,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AViSFrR5k79AQWfZVEm6J1qTSEPvMjfnks5qxqMXgaJpZM4DYTza
.

Something in your codebase. Does not look like a angular/ protractor error
I know of.

Sent from my iPhone

On Oct 19, 2016, at 7:54 PM, narendra [email protected] wrote:

@Saradha,

Thank you so much for feedback.

I am getting below error. Please advice if any workaround. Thank you.

running : npm run dev

Error: Cannot find module './internal/streams/BufferList'

Narendra...!

On 17 October 2016 at 16:48, narendra Reddy narendra.[email protected] wrote:

@ saradha,

Thank you so much. Let me implement this way.

Narendra...!

On 7 October 2016 at 15:52, Saradha [email protected] wrote:

I see above that you have return /thetestroom/.test(url); in the code
above. That was an example I gave for someone else for their url in an
older response. Please change 'thetestroom' here to whatever your url
will
look like. You should have gotten wait time out here instead of angular
issue.
Here is the code I have to solve this issue

homepage.myButton.click().then(function() {
browser.driver.wait(function() {
return browser.driver.getCurrentUrl().then(function(url) {
return url.includes('......'); // checks if the new url has what you are
looking for in ...
}); // this waits until the url changes to whatever it should be in ....
}, 25000, "URL hasn't changed").then(function() {
// after url changed, in new page check these
// pec is protractor expected condition.
// See
http://www.protractortest.org/#/api?view=ProtractorExpectedConditions
browser.wait(pec.visibilityOf(homepage.feedTitle), 20000);
expect(homepage.feedTitle.getText()).toContain('.....');
expect(homepage.feedBody.getText()).toContain('.....');
});


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<https://github.com/angular/protractor/issues/1760#issuecomment-252345767
,
or mute the thread
<
https://github.com/notifications/unsubscribe-auth/AViSFrR5k79AQWfZVEm6J1qTSEPvMjfnks5qxqMXgaJpZM4DYTza

.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/angular/protractor/issues/1760#issuecomment-254996166,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AKCDZXWuZX7dJ0R2V2sHgxKqwydQV8o3ks5q1tfngaJpZM4DYTza
.

Hi srajagopalan1712,

I am running a example on protractor getting below error. Could you please advice. Thank you

error:

goog.global.setTimeout(function() { throw exception; }, 0);
^
Error while waiting for Protractor to sync with the page: "[ng:test] http://errors.angularjs.org/1.4.7/ng/test"

here is my code

describe('My App testing', function() {

      browser.get('http://localhost:port/integrated/myWeb.html').then(function() {


    browser.wait(function() {
        return browser.getCurrentUrl().then(function(url) {
            return 'http://localhost:port/integrated/myWeb.html';

            element(by.model('ctrl.formData.emailAddress')).sendKeys('').clear();
            element(by.model('ctrl.formData.emailAddress')).sendKeys('[email protected]');
            element(by.model('ctrl.formData.emailAddress')).getAttribute('value').then(function (value) {
                expect(value).toEqual('[email protected]');
            });

        });
    }, 10000);
});

Thank you all,

problem solved by added ng-app tag in html page.

I was seeing the same error with Angular 5 testing. Maybe this is stating the obvious but I didn't know you needed to start "ng serve" separately before running your e2e tests if you want to debug. Here is the discussion where I found the answer:
https://github.com/angular/angular-cli/issues/4183

Hope this helps someone!

Was this page helpful?
0 / 5 - 0 ratings