Disabling flow control generates error: "Error while waiting for Protractor to sync with the page: "both angularJS testability and angular testability are undefined."
See original GitHub issueHere is my config:
exports.config = {
capabilities: {
'browserName': 'chrome'
},
seleniumAddress: 'http://localhost:4444/wd/hub',
framework: 'jasmine',
specs: ['test.spec.ts'],
SELENIUM_PROMISE_MANAGER: false,
jasmineNodeOpts: {
defaultTimeoutInterval: 30000
},
beforeLaunch: function () {
require('ts-node/register')
}
};
And here is my simple test:
import {
browser,
ExpectedConditions,
$
} from 'protractor';
describe('When user click \"Test\" button', async () => {
beforeAll(async () => {
expect(browser.getCurrentUrl()).toContain('myawesomewebsite');
});
it ("should click the button", async () => {
var button = $(".button");
button.click();
});
});
This throws me the following error:
UnhandledPromiseRejectionWarning: Error: Error while waiting for Protractor to sync with the page: "both angularJS testability and angular testability are 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"
However it works great if I set SELENIUM_PROMISE_MANAGER
to true
.
According to the simplicity of this test, this seems to be a bug with protractor itself, am I wrong?
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Error while waiting for Protractor to sync with the page: "both ...
You got this error because Protractor by default wait angular page is loaded. If you work with non angular you should add await...
Read more >angular/protractor - Gitter
Failed: Error while waiting for Protractor to sync with the page: "both angularJS testability and angular testability are undefined.
Read more >Testing with Protractor: how to fix synchronization issues
"Waiting for Angular" timeout error · An error in your test results will look like this:  Timed out waiting for asynchronous Angular tasks...
Read more >Debugging Protractor Tests
Protractor will fail when it cannot find the Angular library on a page. If your test needs to interact with a non-angular page,...
Read more >[Code example]-Protractor no waiting for web page to change
Using Angular 5 with Protractor. Having trouble waiting for the browser url to change to see if the user logs in and then...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
you have to add
.waitForAngularEnabled(false)
in theonPrepare
property ofprotractor.conf
:@Kurt29 is the page per chance Unicode encoded somehow and has the setting <meta charset="utf-8" /> in the head?
I’m sitting with the same problem.