Timed out waiting for asynchronous Angular tasks to finish after 500 seconds.
See original GitHub issueBelow is protractor config.js
` ‘use strict’; exports.config = {
seleniumAddress: 'http://localhost:4444/wd/hub',
getPageTimeout: 60000,
allScriptsTimeout: 500000,
jasmineNodeOpts: {defaultTimeoutInterval: 10000},
ignoreUncaughtExceptions: false,
framework: 'custom',
// path relative to the current config file
frameworkPath: require.resolve('protractor-cucumber-framework'),
multiCapabilities: [{
'browserName': 'chrome',
'shardTestFiles' : true,
'maxInstances' : 3,
'maxSession':3
}]
/*capabilities: {
'browserName': 'chrome',
'chromeOptions': {
'mobileEmulation' : {
'deviceName': 'Google Nexus 5'
}
}
}*/,
// Spec patterns are relative to this directory.
specs: [
'../features/Login.feature'
],
baseUrl: 'http://libris.api.dev.bv',
params: {
userName: 'test',
password: 'password',
Token:'',
ecWait: {
waitTime: 100000
},
},
plugins: [{
package: 'protractor-multiple-cucumber-html-reporter-plugin',
options:{
// read the options part
automaticallyGenerateReport: true,
removeExistingJsonReportFile: true,
removeOriginalJsonReportFile: true
}
}],
onPrepare: function () {
var chai = require('chai');
chai.use(require('chai-as-promised'));
chai.should();
//browser.manage().window().maximize(); // maximize the browser before executing the feature files
var timeStamp = require('../commons/commons.js');
timeStamp.setTimeStamp()
},
onComplete: function () {
console.log('all tests have finished');
browser.close();
},
// This setting tells protractor to wait for all apps
// to load on the page instead of just the first.
// useAllAngular2AppRoots: true,
rootElement: '[ng-app="app"]',
ng12Hybrid: false,
cucumberOpts: {
require: ['../commons/*.js', '../steps/*.js', '../support/*.js'],
tags: false,
strict: true,
'no-colors': true,
dryRun: false,
format: ['json:cucumberReports/cucumber.json']
// parallel: 2
}
}; `
below is package.json
{ "name": "ProtractorDemo", "version": "0.0.0", "description": "protractor demo", "author": "Aniruddh Solanki", "main": "config/conf.js", "dependencies": { "chai": "^4.1.2", "chai-as-promised": "^7.1.1", "cucumber": "^4.2.1", "cucumber-html-reporter": "^4.0.2", "protractor-cucumber-framework": "^5.0.0", "cucumber-html-report": "^0.6.5", "protractor": "^5.3.1", "relative-path": "^1.1.0", "protractor-multiple-cucumber-html-reporter-plugin":"1.7.0" }, "scripts": { "test": "./node_modules/.bin/protractor config/conf.js" }, "license": "MIT" }
When we run the test it throws an as below
Timed out waiting for asynchronous Angular tasks to finish after 500 seconds. This may be because the current page is not an Angular application. Please see the FAQ for more details: https://github.com/angular/protractor/blob/master/docs/timeouts.md#waiting-for-angular While waiting for element with locator - Locator: By(css selector, [ng-model=“user”]). The following tasks were pending:
- $timeout: function c(e){t.$broadcast(“$keepalive”),i.isObject(n.http)?r(n.http).success(function(n,i){u(n,i,e)}).error(function(n,i){u(n,i,e)}):e||a()}
- $timeout: function c(){s.idling=!s.idling;var i=s.idling?“Start”:“End”;e.$broadcast(“$idle”+i),s.idling?(a(),s.countdown=n.warningDuration,l()):u()} [14:54:13] E/launcher - ScriptTimeoutError: asynchronous script timeout: result was not received in 500 seconds
ng-app is defined in html tag
<html lang="en" ng-app="app" class="ng-scope">
also tried changing rootElement: ‘[ng-app=“app”]’, to rootElement: ‘html’, but it does not work.
Please help
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
@IgorSasovets I have tried your suggestion which made it work so close the issue. Thankyou
@Suprabhad , are there any updates on this issue?