I'm trying to do a drag and drop function using typescript and Playwright. In the meantime I was trying to use the evaluateHandle method, however it seems that the code is not entering inside the method. I have a console.log inside the method that never logs in console. What am I doing wrong?
await page.evaluateHandle(async (data) => {
const dt = new DataTransfer();
console.log('Reached here');
const blobData = await fetch(data).then(res => res.blob());
const file = new File([blobData], 'ci.csv', { type: 'application/csv' });
dt.items.add(file);
return dt;
}, buffer);