【发布时间】:2016-07-21 16:29:57
【问题描述】:
我期待value_key(翻译)被protractor找到并返回true,这样测试成功。
在我的 test-spec.js 文件中
it('test if tile "Value of Key" shows result text', function() {
expect(
element(by.xpath('//*[@id="idname"]/div/h3')
).getText()).toEqual(helpers.translate('value_key'));
});
量角器错误 信息: 预期的“键值”等于 Object({ $$state: Object({ status: 0 }), catch: Object({ }), then: Object({ }), finally: Object({ }) })。
感谢您的帮助
【问题讨论】:
-
helpers.translate('value_key') 它会返回什么,我能看到它的代码吗?
标签: javascript angularjs protractor