Running into Error while waiting for Protractor to sync with the page with basic protractor test

前端 未结 7 1996
南旧
南旧 2020-12-03 10:31
describe(\'my homepage\', function() {
    var ptor = protractor.getInstance();
    beforeEach(function(){
        // ptor.ignoreSynchronization = true;
        ptor         


        
7条回答
  •  借酒劲吻你
    2020-12-03 11:10

    I got the same error message (Angular 1.2.13). My tests were kicked off too early and Protractor didn't seem to wait for Angular to load.

    It appeared that I had misconfigured the protractor config file. When the ng-app directive is not defined on the BODY-element, but on a descendant, you have to adjust the rootElement property in your protractor config file to the selector that defines your angular root element, for example:

    // protractor-conf.js
    rootElement: '.my-app',
    

    when your HTML is:

提交回复
热议问题