我的测试套件包含200多个测试用例,通常我会在几个测试用例中获得ScriptTimeoutError。此错误是随机的,并非特定于特定测试用例。 请注意:allScriptsTimeout:120000,在conf.js文件中设置
量角器版本= 5.1.2
请参阅错误日志
Failed: Timed out waiting for asynchronous Angular tasks to finish after 120 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.cssContainingText(".ng-binding", "My example").
The following tasks were pending:
- $http: https://api.example.com/api/exampleionUsers
Stack:
ScriptTimeoutError: asynchronous script timeout: result was not received in 120 seconds
(Session info: chrome=59.0.3071.86)
(Driver info: chromedriver=2.29.461591 (62ebf098771772160f391d75e589dc567915b233),platform=Windows NT 10.0.14393 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 120.07 seconds
Build info: version: '3.4.0', revision: 'unknown', time: 'unknown'
System info: host: 'LAPTOP-RNQ2JQBE', ip: '192.168.89.84', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_121'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities [{applicationCacheEnabled=false, rotatable=false, mobileEmulationEnabled=false, networkConnectionEnabled=false, chrome={chromedriverVersion=2.29.461591 (62ebf098771772160f391d75e589dc567915b233), userDataDir=C:\Users\NEXTGEN\AppData\Local\Temp\scoped_dir15404_10872}, takesHeapSnapshot=true, pageLoadStrategy=normal, databaseEnabled=false, handlesAlerts=true, hasTouchScreen=false, version=59.0.3071.86, platform=XP, browserConnectionEnabled=false, nativeEvents=true, acceptSslCerts=true, locationContextEnabled=true, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true, unexpectedAlertBehaviour=}]