Closed georgecrawford closed 8 years ago
I noticed that wrapAsync in https://github.com/webdriverio/webdriverio/blob/562db5d1b90b2f7d34d4c6b282f087c9eb07a79e/lib/helpers/wrapAsync.js#L22 moves a synchronous command into the main commandName space, but copies the async equivalent to commandName + 'Async'. This doesn't work where there's already an equivalent - the executeAsync command thereafter uses the asynchronous version of execute, which is not what's desired.
wrapAsync
commandName
commandName + 'Async'
executeAsync
execute
I think the exact problem is replicated in this repo, at https://github.com/webdriverio/wdio-sync/blob/master/index.js#L17.
I noticed that
wrapAsync
in https://github.com/webdriverio/webdriverio/blob/562db5d1b90b2f7d34d4c6b282f087c9eb07a79e/lib/helpers/wrapAsync.js#L22 moves a synchronous command into the maincommandName
space, but copies the async equivalent tocommandName + 'Async'
. This doesn't work where there's already an equivalent - theexecuteAsync
command thereafter uses the asynchronous version ofexecute
, which is not what's desired.I think the exact problem is replicated in this repo, at https://github.com/webdriverio/wdio-sync/blob/master/index.js#L17.