gpt4 book ai didi

angularjs - Protractor - 在 webstorm 中调试

转载 作者:太空宇宙 更新时间:2023-11-04 02:15:08 24 4
gpt4 key购买 nike

我尝试在我的网络 Storm 中配置 Protractor 调试。这是我提到的配置 here :

Protractor config

这是 Protractor .conf:

/*all the test files we want to add*/
var specsArr = ['./js/init.js']; // init is mandatory for tests running

/*for production*/
//specsArr.push('*/*.e2e.js');

/*for development*/
specsArr.push('login/login.e2e.js');

var config = {
onPrepare: function(){
global.EC = protractor.ExpectedConditions;
global.loggedIn = false;

global.path = require('path');
global.mock = require('protractor-http-mock');

global.params = require("./js/e2e.params.js");
global.utils = require('./js/e2e.utils.js');

/*pages*/
global.loginPage = require('./login/login.obj.js');
global.dashboardPage = require('./dashboard/dashboard.obj.js');
global.sidebar = require('./sidebar/sidebar.obj.js');
global.dataPathsPage = require('./datapath/datapaths.obj.js');
global.createDataPathPage = require('./datapath/create-datapath.obj.js');
global.singleDataPathPage = require('./datapath/single-datapath.obj.js');
global.messagesPage = require('./messages/messages.obj.js');
global.createMessagePage = require('./messages/create-message.obj.js');
global.singleMessagePage = require('./messages/single-message.obj.js');
global.usersPage = require('./users/users.obj.js');
global.createUserPage = require('./users/create-user.obj.js');
global.singleUserPage = singleUserPage = require('./users/single-user.obj.js');

require('protractor-http-mock').config = {
rootDirectory: __dirname, // default value: process.cwd()
protractorConfig: 'protractor.conf'
};
},
allScriptsTimeout: 30000,
chromeDriver: './activation/chromedriver.exe',
seleniumServerJar: './activation/selenium-server-standalone-2.52.0.jar',
specs: specsArr,
mocks: {
dir: 'mocks',
default: []
},
capabilities: {
'browserName': 'chrome'
},
framework: 'jasmine2',
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 30000,
isVerbose: true
}
};

exports.config = config;

现在,当我单击运行按钮时,一切正常。但是,当我单击“调试”时,我在控制台中得到以下输出:

enter image description here

Node 版本:v5.3.0

Protractor :v3.2.1

最佳答案

我通过将 Node 升级到 5.9.0 解决了这个问题。

关于angularjs - Protractor - 在 webstorm 中调试,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36104479/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com