LambdaTest WebdriverIO Error: '.' not recognized in npm run command

I am trying to run the WebdriverIO test on LambdaTest and I am getting the error “‘.’ is not recognized as an internal or external command, operable program or batch file.”. My run command is “npm run single” and the script for single is “single”: “./node_modules/.bin/wdio conf/single.conf.js”. What am I doing wrong?

1 Like

Hey Devan,

To resolve the error “‘.’ is not recognized as an internal or external command, operable program or batch file” when running WebdriverIO tests on LambdaTest using the “npm run single” command, modify your script as follows:

Replace your current script:

"single": "./node_modules/.bin/wdio conf/single.conf.js"

With the updated script:

"single": "node_modules\\.bin\\wdio conf\\single.conf.js"

Now, execute the following command to run your test successfully:

npm run single

This modification ensures that the correct path separator is used based on the operating system. The updated script uses backslashes for Windows environments and forward slashes for Unix-like environments.

Hope this explanation will help resolve your issue contact us for further queries.