Search code examples
angularjsjasminetimeoutprotractorend-to-end

What are the methods we can use to wait for an angular site to be loaded in order to test it with protractor?


What are the methods we can use to wait for an Angular site to be loaded in order to test it with protractor in order to avoid this error caused by jasmine : A Jasmine spec timed out. Resetting the WebDriver Control Flow ? I'm able to make the login and go to home page that test is passed, but from the second test i have problems of jasmine. Here the config file and test spec

enter image description here


Solution

  • I have configured this problem by adding this function into my config file :

        onPrepare: function() {
          return browser.getProcessedConfig().then(function(config) {
            var browserName = config.capabilities.browserName;
            browser.manage().timeouts().setScriptTimeout(60000);
          });
        });