On:
Mac M1,
Chrome browser
running on localhost
I’m trying to test a part of my site that uploads an image file.
await page.setInputFiles('input[data-test-id="front-file"]', './test-utils/image.png');
front-file is an input file type.
This works fine when running in VS Code on my Mac, but fails when running in the Playwright UI.
I don’t get an error in the UI, but when I run the chrome console I can see a few errors:
In the console I see this:
The FetchEvent for "<URL>" resulted in a network error response: the promise was rejected. The FetchEvent for "https://pw-blob--http//localhost:3001/bebb8145-3c2f-4ba9-b474-b1003008c2b8" resulted in a network error response: the promise was rejected.
and the network tab shows:
Request URL: https://pw-blob--http//localhost:3001/20a84fac-d376-4a95-a985-2d4885b14be4 Referrer Policy: strict-origin-when-cross-origin
I’ve tried moving the file to other locations.
Any ideas on how to get this to work would be appreciated 🙂
Thanks