我正在尝试启动一个简单的测试,但是它无法打开chrome并最终导致
错误 FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
请参见下面的屏幕截图
import {
browser,
Config
} from 'protractor';
exports.config = {
capabilities: {
name: 'Chrome-Stable',
browserName: 'chrome',
logName: 'Chrome-Stable',
shardTestFiles: true,
maxInstances: 2
},
chromeDriver: './node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_2.41.exe',
specs: [
'./e2e/Tests/Specs/Test_spec.js'
],
baseUrl: 'https://www.google.com/',
onPrepare: () => {
browser.driver.get(browser.baseUrl);
},
framework: 'jasmine2',
jasmineNodeOpts: {
defaultTimeoutInterval: 30 * 1000
},
allScriptsTimeout: 30 * 1000,
getPageTimeout: 10 * 1000
};
Package.json
{
"name": "scout",
"version": "1.0.0",
"description": "",
"main": "index.js",
"dependencies": {},
"devDependencies": {
"@types/jasmine": "^2.8.8",
"dotenv": "^6.0.0",
"jasminewd2": "^2.2.0",
"mssql": "^4.1.0",
"protractor": "^5.4.0",
"protractor-html-reporter": "^1.3.2",
"tsc": "^1.20150623.0",
"tslint": "^5.11.0",
"typescript": "^3.0.1",
"typings": "^2.1.1"
},
"scripts": {
"tsc": "tsc || true",
"tslint": "tslint './e2e/**/*.ts' || true"
},
"author": "",
"license": "ISC"
}
chromedriver位置(。\ node_modules \ protractor \ node_modules \ webdriver-manager \ selenium)