我正在尝试在baseUrl
Protractor配置的onPrepare
函数中动态设置。它确实设置了URL,但在访问页面时不接受上下文中的散列(“#”)。
exports.config: {
framework: 'jasmine2',
.
.
.
onPrepare: function() {
browser.baseUrl = "https://google.com/#2/resource";
}
}
在上述情况下,它对https://google.com
而不是https://google.com/#2/resource
运行测试。
发布于 2016-06-04 07:25:17
尝试从命令行传递--baseUrl="https://google.com/#2/resource“:
protractor protractor.conf.js --baseUrl="https://google.com/#2/resource"
https://stackoverflow.com/questions/37622493
复制相似问题