Protractor times out waiting for sync with page when using $resource

前端 未结 4 1438
庸人自扰
庸人自扰 2020-12-09 11:04

I\'m testing Protractor with a small AngularJS app.

This is the test:

describe(\'Testing Protractor\', function() {
  var draftList;

  it(\'should c         


        
4条回答
  •  不思量自难忘°
    2020-12-09 11:23

    Instead of using browser.ignoreSynchronization, use browser.waitForAngularEnabled(*boolean*). browser.waitForAngularEnabled(false) sets browser.ignoreSynchronization to true, browser.waitForAngularEnabled(true) sets browser.ignoreSynchronization to false.

    you can also include this as part of your test suites' config file:

    onPrepare: function () {
        'use strict';
        browser.waitForAngularEnabled(false);
    }
    

提交回复
热议问题