量angular器在onPrepare之后随机失败

我遇到的问题是在本地和Selenium Grid上完全随机发生的。

在onPrepare之后,某些规格会随机失败。 命令提示符提供此信息。

currentRunnable()。addExpectationResult(false,{^ TypeError:无法读取在Env.fail(c:\ Users \ User \ AppData \ Roaming \ npm \ node_modules \ protracto r \ node_modules \ jasmine \ node_modules \ jasmine中未定义的属性'addExpectationResult' -core \ lib \ jasmine-core \ jasmine.js:894:24)

From:Task:WebDriver.manage()。window()。在[object Object] .webdriver.WebDriver.schedule(c:\ Users \ User \ AppDat a \ Roaming \ npm \ node_modules \ protractor \ node_modules \ selenium -webdriver \ lib \ webdri ver \ webdriver.js:360:15)

onPrepare运行该命令

browser.driver.manage().window().maximize();

紧随其后的是每个规范在与用于login并导航到应用程序的非angular元素交互之前运行的规范。

发生错误,立即停止testing,并失败,但它不会用茉莉花报告任何东西,使用jasmine2-html-reporter,并将进入下一个testing。

之后我可以立即运行完全相同的命令,并且不会有任何错误。 它不会经常发生在任何特定的规格。

有没有人遇到类似的东西?