The following code:
describe('Locale syncing from GUI to Accounts', function () {
it('should change the interface to English', function () {
const properTextPresent = EC.textToBePresentInElement(
browser.driver.findElements(by.css('label[for="id_password_verification"]')), 'Password');
});
});
triggers an error:
1) Locale syncing from GUI to Accounts should change the interface to English
Message:
Failed: Cannot read property 'bind' of undefined
Stack:
Error: Failed: Cannot read property 'bind' of undefined
at /Users/mgol/Documents/projects/bn/cbn/repo/polona-gui/node_modules/protractor/node_modules/jasminewd2/index.js:104:16
at /Users/mgol/Documents/projects/bn/cbn/repo/polona-gui/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/base.js:1582:15
at [object Object].webdriver.promise.ControlFlow.runInNewFrame_ (/Users/mgol/Documents/projects/bn/cbn/repo/polona-gui/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:1654:20)
at notify (/Users/mgol/Documents/projects/bn/cbn/repo/polona-gui/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:465:12)
in Protractor 1.7.0 (tested on io.js 1.3.0 & Node 0.12.0 with Jasmine 2).
The documentation mentions selecting elements via $ but that's not possible on a non-Angular page where it'd be most useful to use ExpectedConditions.
EC is designed to take a protractor web element (returned by element or $), not a webdriver one - we should look into supporting both. For now, you can use $ if you first set browser.ignoreSynchronization = true
For now, you can use $ if you first set browser.ignoreSynchronization = true
Can it be changed dynamically during the tests? That would solve my issue until Protractor gains support for webdriver elements in conditions.
BTW, I don't see browser.ignoreSynchronization mentioned at http://angular.github.io/protractor/#/api, is this an experimental API?
See https://github.com/angular/protractor/issues/1820 for the docs issue
Yes, you can dynamically change browser.ignoreSynchronization
This also occurs with $$
did it got solved?
browser.ignoreSynchronization is working for me for protractor 2.1 and a non-angular website. :+1:
Hello, I am seeing this issue even though I am using Expected conditions on webelements returned through element. I tried with $ as well, that resulted in the same thing.
Appreciate any thoughts on this. This is happening when calling go Method below.
Note - This is a non angular app,I have set ignoreSynchronization=true
Page Objects File
module.exports = {
login: element(by.model('credentials.username')),
password: element(by.model('credentials.password')),
user: "Email",
passwd: "Password",
goButton: $('input.btn.btn-primary'),
EC: protractor.ExpectedConditions,
go: function() {
browser.get("Application URL",30000);
browser.wait(this.EC.elementToBeClickable(this.login),30000);
},
Below is my Sample Test Suite
var VMPage = require('./LoginPage.js');
describe('App Demo', function() {
beforeEach(function() {
console.log("_Before Each Started_");
browser.driver.manage().timeouts().implicitlyWait(30000);
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1800000;
browser.ignoreSynchronization = true;
VMPage.go();
VMPage.login();
});
it('Test Case', function() {
console.log("***Test Started***");
});
});
Is this solved or is there any workaround for this ?
I am facing the same issue for a non-angular app and I have set ignoreSynchronization=true
Any update on above issue,
I have used like
browserinstance.ignoreSynchronization = true;
browserinstance.wait(EC.presenceOf($('.sapMCustomTileContent')), 120000);
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.
Most helpful comment
Is this solved or is there any workaround for this ?
I am facing the same issue for a non-angular app and I have set ignoreSynchronization=true