I am running an automation test in sauceLabs using webdriverio v5. I want to run a test which is uploading a file to msedge. Below is the sample code for the same.
const path = require('path');
const filePath = path.join(__dirname, 'path/to/your/file');
const remoteFilePath = browser.uploadFile(filePath);
$('upload file input selector').setValue(remoteFilePath);
This code works fine with chrome and firefox but when i try to run the same in msedge
is gives Error: The uploadFile command is not available in msedge
.
Seems like browser.uploadFile only works for chrome. i have tried various other things but the solutions works mostly on local and not on remote server like sauceLabs.
Is there any alternative for browser.uploadFile
or any workaround which can be used to upload the file in msedge browser?