I am using appium and webdriverio for some mobile app testing. I am debugging some code in the wdio REPL, which I run with npx wdio repl {wdio.conf.js} -h {host} -p {port}
. The REPL seems to be working for my needs, however, console.log('foo');
returns undefined
and so does process.stdout.write('foo');
. However, if I just run node
for a plain node repl, I can use either of those commands to print to the console. In the wdio repl, I can do let foo = 'bar';
then call foo
which will print 'bar'
but this doesn’t work when I attempt to print within a function by calling foo
. How can I print to the console in the wdio repl, either by console.log(), process.stdout.write(), or other means?