wdi5 complying with wdio
's "async" notation
#104
Replies: 4 comments 4 replies
-
and it seems we'll be able to do: const items = await browser.asControl(listSelector).getItems() (instead of const list = await browser.asControl(listSelector)
const items = await list.getItems() ) this would even further reduce migration efforts - on both your and our side 😄 |
Beta Was this translation helpful? Give feedback.
-
Hi @vobu, I'd like to know when will this async feature be delivered? For now I could only use node < 16 and use sync in wdi5, right? I think you know that recently many teams in SAP are doing research to migrate from UIVeri5 to WDI5 (we are one of them). As a WDI5 rookie I should directly start my research with async, right? But it seems not possible now. Thank you and best regards, |
Beta Was this translation helpful? Give feedback.
-
first alpha release of |
Beta Was this translation helpful? Give feedback.
-
and with v0.8.0, the fluent async api is in! |
Beta Was this translation helpful? Give feedback.
-
wdi5
as of now allows for sugar-coated pseudo-sync style of writing tests:(execution of the test is actually async, but the notation looks sync)
This was possible by re-using that feature from
wdio
, which itself utilized thefibers
node module for making sync-style notation possible.fibers
was declared obsolete by the author as it won't work with Node >= 16 and that's whywdio
deprecated bespoken sync-style notation and will drop support from April on.📢 This means we also need to adapt
wdi5
to follow along withwdio
, drop sync-style notation, and adapt the JS standardasync/await
"async"-style.This will result in a breaking change - as we're not on
1.0
(yet), the next minor version ofwdi5
will contain the async-rewrite.For all
wdi5
ers out there, this unfortunately means that you have to adapt your tests in order to support any futurewdi5
-versions. The above "sync" example would then look like:Even though this creates additional work for all, including us, we will benefit in the long run from moving closer to the asynchronous coding standard in JavaScript. There are a couple of major feature additions planned for
wdi5
in 2022 that needasync/await
as a prerequisite. But 🤫 , no spoilers (yet) 😸EDIT: async notation rewrite done with v0.8.0
Beta Was this translation helpful? Give feedback.
All reactions