【发布时间】:2019-01-24 12:52:39
【问题描述】:
我要做的是打印/使用Polyline 属性的值。
<Polyline points="x,y x,y x,y x,y">
我试过用这些方法来获取它们:
这是一个实用函数
export const getPointAttribute = async () => {
const polyline = s.polyline;
const polylineData = ClientFunction(() => polyline().attributes, {
dependencies: { polyline }
});
return polylineData
}
这是在测试脚本里面
test('', async (t) => {
console.log(u.getPointAttribute())
}
或
test('', async (t) => {
console.log(s.polyline.getAttribute('points'));
}
我将我的选择器包含在外部
import * as s from '../utilities/selectors';
但我得到的只是控制台日志中的输出承诺
承诺{ }
或
ReExecutablePromise { _then: [], _fn: [Function], _taskPromise: null }
感谢任何帮助!
【问题讨论】:
标签: javascript reactjs testing e2e-testing testcafe