I am trying to upload a file in a file upload filed in WebdriverIO with AutoIT. I am unable to execute the .exe file which will select the file from File Explorer in Windows. Can anyone tell me what is the mistake in the code?

    var exec = require('child_process').execFile;
    * Function to execute exe
    * @param {string} fileName The name of the executable file to run.
    * @param {string[]} params List of string arguments.
    * @param {string} path Current working directory of the child process.
    function execute(fileName, params, path) {
    let promise = new Promise((resolve, reject) => {
        exec(imup.exe, params, { cwd: "F:\\imup.exe" }, (err, data) => {
            if (err) reject(err);
            else resolve(data);

    return promise;
  • whats the error
    – PDHide
    Commented Dec 15, 2021 at 11:36
  • Not getting any error. But, the .exe file is not executing. Not sure if WebdrvierIO executed the file. Commented Dec 15, 2021 at 12:07


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.