Hi all, i write synthetic test using playwright.
I want to trigger a post request that do an upload image. Example
import * as fs from 'fs'
...
const imageFile = fs.readFileSync(`./images/demo.jpg`)
...
{
headers: {
Accept: 'application/json',
Authorization: 'Bearer 437a7a2b4d07c66c4b0f07d3900816a6'
},
multipart: {
id: 'myId-1234',
time: 1730823793,
picture: {
name: 'picture',
mimeType: 'image/jpg',
buffer: imageFile
},
}
}
...
when i execute this code it works from my local machine (npx @elastic/synthetics journeys) but in ELK it cannot locate image : Error running test
error executing step: ENOENT: no such file or directory, open './images/demo.jpg'
My question is: how to retrieve my imageFile path so then i can trigger the request properly? Thanks for your help!