在命令提示符
上显示意外的令牌问题onPrepare: function() {
return browser.getCapabilities().then(caps) {
var sessionId = caps.caps_['webdriver.remote.sessionid'];
jasmine.getEnv().addReporter(new Jasmine2HtmlReporter({
savePath: 'C:/report/report/screenshots' + sessionId
}));
};
}
答案 0 :(得分:2)
您忘了为callback function
函数传递then()
。
return browser.getCapabilities().then(function (caps) {
var sessionId = caps.caps_['webdriver.remote.sessionid'];
jasmine.getEnv().addReporter(new Jasmine2HtmlReporter({
savePath: 'C:/report/report/screenshots' + sessionId
}));
});