Skip to content
Advertisement

Webdriverio using async/await – What is recommended? [closed]

I am running my functional tests using WebdriverIO. I can get the WebdriverIO tests to pass even without async/await. But I read some articles that async/await is the best way of coding javascript to handle promises.

I am new to Javascript and pretty lost on promises. What is the best way to code in WebdriverIO (using async/await, or not | e.g: turn sync off in config and use this?)

The wdio.conf.js config file states the following:

JavaScript

Advertisement

Answer

WebdriverIO still uses async/await in the background, it just handles it for you. I’d definitely recommend using ‘sync’ mode, as it reduces the verbosity of your tests.

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement