量angular器debugging模式给出“致命错误:CALL_AND_RETRY_LAST分配失败 – 进程内存不足”

我正在运行一个脚本,使用NodeJS 0.12.4,Protractor 2.1.0来自动login网页,我的系统是Win 8.1,i7 2.5 GHz,16 GB RAM,所以我认为我不太可能跑出去的记忆! 只是FYI,当我注释代码中的所有语句,但browser.get(),我在交互模式下使用browser.pause()在开始时逐一执行它们,代码工作。 这是spec.js文件的代码:

describe('Web Page Login', function() { it('should login', function() { browser.get('http://URL_HERE'); // opens page //browser.pause(); element(by.css('[ng-click="showLogin(true);"]')).click();// clicks the login link to open the login dialog var user = element(by.model('user.login.username'));// input user name user.sendKeys('user'); var pass = element(by.model('user.login.password')); // input password pass.sendKeys('pass'); element(by.css('[ng-click="login();"]')).click();// clicks the login button var userName = element(by.className('ng-binding'));// locates the logged in user from the player details element and store it in "userName" userName.getText(); //extracts the text that contains the user name expect(userName).toBe("user"); //compare the string obtained above with the one expected }); }); 

这是conf.js文件的代码:

 var HtmlReporter = require('protractor-html-screenshot-reporter'); var reporter=new HtmlReporter({ baseDirectory: './results', // the location to store the screen shots and results. docTitle: 'Login test result', docName: 'login-tests-report.html' }); exports.config = { seleniumAddress: 'http://localhost:4444/wd/hub', specs: ['login-spec.js'], onPrepare: function() { jasmine.getEnv().addReporter(reporter); } }; 

不幸的是,我不能发布我们的网站的url,因为它是内部的,如果需要的话,我可以发布一些片段。 所以如果我尝试运行它打字

量angular器conf.js

没有评论所有行我得到这个错误:

致命错误:CALL_AND_RETRY_LAST分配失败 – 进程内存不足

但是,如果我注释spec.js除browser.get()以外的所有行,我使用repl进入debugging交互模式,并从代码中逐一input每行代码,如上所述,我可以执行所有代码到最后没有错误。 2周前我开始使用量angular器和JavaScript,所以我可能会错过一些东西。 感谢您的任何帮助。

我有种想法如何使代码工作,而不是什么触发这个错误,我怀疑这可能是来自节点库的东西,在与我的一个开发人员的讨论后。 改变我执行断言的方式消除了错误。 以下是可用的代码:

 describe('Web Page Login', function() { it('should login', function() { browser.get('http://URL_HERE');//opens Web page element(by.css('[ng-click="showLogin(true);"]')).click();//clicks the login link to open the login dialog element(by.model('login.user.login.username')).sendKeys('username');//input user name element(by.model('login.user.login.password')).sendKeys('password');//input password element(by.css('[ng-click="login.login(false, loginForm.$valid);"]')).click(); //clicks the login button var userName = element(by.className('ng-binding'));// locates the logged in user from the player details element and store it in "userName" expect(userName.getText()).toContain('username');//compares the string found with the one expected and asserts if it's true or false }); });