量angular器asynchronous等待不是一个function

你好,我试图使用asynchronous等待,但不知道如何做到这一点。 这是我的代码。 我有节点7.6.0安装。 量angular器v5.1.1和诺言pipe理器在我的conf.js中被禁用。

"use strict"; console.log('111'); describe('A', function(){ console.log('222'); it('B', async function(){ await browser.get('http://www.yahoo.com'); console.log('333'); }); }); 

当我运行testing时,它说我的callback不是一个函数。

 1) A encountered a declaration exception - Error: async function (){ browser.get('http://www.yahoo.com'); console.log('333'); } is not a function browser.get('http://www.yahoo.com'); console.log('333'); } is not a function 

为什么? 我该如何解决? 不知道我是否正确写入。 谢谢。

我遇到了与nodejs 7.9 +量angular器5.1.1相同的问题

这是jasminewd2中的一个问题,并且仍然是开放的,请参阅以下链接以获取更多详细信息: https : //github.com/angular/protractor/issues/4186

在上述问题的wiki页面中,有一个pull请求https://github.com/angular/jasminewd/pull/87 ,前几天已经合并到jasminewd中,我手动修改文件node_modules/protractor/node_modules/jasminewd2/index.js根据拉请求,工作正常。