Cannot reproduce the problem with testcafe@0.19.2
.
Internally, testcafe-vue-selectors
uses a ClientFunction
with custom method getVue
.
I've created a simple example related to your scenario:
import { Selector } from 'testcafe';
fixture `Fixture`;
test('test', async t => {
const extendedSelector = Selector('body').addCustomMethods({
method: () => {
var complexObject = {
prop1: {
prop2: [
{ id: 1, data: '1' },
{ id: 2, data: '2' },
{ id: 3, data: '3' }
]
}
};
return complexObject;
}
});
const fnResult = await extendedSelector().method();
const prop2 = fnResult.prop1.prop2;
prop2.forEach(item => console.log(item));
});
and it works good.
Could you please provide an example on which I can reproduce the problem?