[英]protractor in connection with selenium keeps connecting to localhost
I have a setup of my angular-app and a separate selenium server as docker-compose setup 我有一个我的angular-app设置和一个单独的硒服务器作为docker-compose设置
my protractor setting looks like this 我的量角器设置如下所示
const { SpecReporter } = require('jasmine-spec-reporter');
exports.config = {
allScriptsTimeout: 11000,
specs: [
'./e2e/**/*.e2e-spec.ts'
],
capabilities: {
'browserName': 'chrome'
},
directConnect: false,
baseUrl: 'http://user-frontend:4200/',
seleniumAddress: 'http://selenium:4444/wd/hub',
framework: 'jasmine',
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 30000,
print: function() {}
},
onPrepare() {
require('ts-node').register({
project: 'e2e/tsconfig.e2e.json'
});
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
}
};
now I run the command to run the end2end tests using protractor: 现在,我运行命令以使用量角器运行end2end测试:
ng e2e --no-serve
All my tests are failing, and when I debug the selenium server and take screenshots, I see it is trying to connect to itself (localhost) instead of back to the application host baseUrl: 'http://user-frontend:4200/',
我所有的测试都失败了,当我调试硒服务器并截图时,我看到它正在尝试连接到自身(localhost)而不是返回到应用程序主机
baseUrl: 'http://user-frontend:4200/',
any Idea what I am doing wrong here? 任何想法我在这里做错了吗?
您确定未在其他位置设置browser.baseUrl
(或browser.get()
)吗?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.