Closed ohaibbq closed 3 years ago
Hi there 👋 Thanks for raising this!
You are absolutely right this is broken when not using the chromedriver service, I guess Chromedriver is able to process the untransformed elements by happy accident? I'm not sure either 🤷♂️.
The changes make sense to me and as you say this is how WebdriverIO expects arguments to be passed to executeAsync so this will likely prevent unexpected behaviour in future. 🙌
Once the branch has passed it's tests I'll squash and merge with a fix:
prefix so that semantic-release publishes the new version. 😄 (edit: the only way to do this is to rename the PR it seems, sorry about that!)
:tada: This PR is included in version 2.1.1 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
The test suite on
master
currently fails if you remove theservices: ['chromedriver']
fromwdio.conf.js
.executeAsync
expects args to be passed in position order. It captures them using the rest operator (...args). The list of arguments is then passed toexecuteScriptAsync
which transforms them.The transformer checks the for the presence of the WebElement identifier. If it exists, it will transform it into a Puppeteer element handle. However, since the
arg
is a 2 dimensional array, it does not perform the transformation, as the WebElement identifier property does not exist.As for why this works in Chromedriver.. 🤷