Hello!
I am opening the file I want to upload in the init
const fileForUpload = open('./files/skipped/meta-001.pdf', 'b');
My code with use of page.setInputFiles()
await page.setInputFiles('input[class="dz-hidden-input"]', {
name: 'meta-001.pdf',
mimeType: 'application/octet-stream',
buffer: fileForUpload,
});
When the code runs I get the following error when the `page.setInputFiles()` step runs
INFO[0022] Error performing ui interactions: setting input files on "input[class=\"dz-hidden-input\"]": InvalidCharacterError: Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.
at __xk6_browser_evaluation_script__:2056:39
at Array.map (<anonymous>)
at InjectedScript.setInputFiles (__xk6_browser_evaluation_script__:2055:30)
at __xk6_browser_evaluation_script__:3:20 source=console
I have tried looking at documentation and researching other examples but I have had no luck getting this to work.
Anyone have any ideas?
k6 version info: k6 v1.4.2 (commit/5b725e8a6a, go1.25.4, linux/amd64)