Closed 7artur7 closed 1 year ago
Thanks for reporting!
I can reproduce this problem and it seems that the package we use to make array operation async/await aware is not working anymore. The file to look at first would be packages/wdio-utils/src/shim.ts
.
Any contributions that resolves the bug are highly appreciated. Please take a look into our contribution guidelines and let us know if you have any questions. Cheers!
Have you read the Contributing Guidelines on issues?
WebdriverIO Version
8.0.9
Node.js Version
18.12.1 (OS X 12.5)
Mode
WDIO Testrunner
Which capabilities are you using?
What happened?
After update to v8.0.9, I faced unexpected behaviour while using
getText()
inside of callback functions of e.g.find()
,map()
methods. Method isn't executed or registered as pending promise.Example:
Wouldn't click on Contribute but stay on Docs. If debug this code execution is jumped out on first call to
const text = await link.getText()
Or
Would return set of pending promises for each
$tag.getText()
.In wdio 7.27.0. Both methods works correctly. Contribute tab is clicked. Tag text being returned.
What is your expected behavior?
getText()
and other element async methods work the same as in v7 or it is documented that v8 behaviour is a correct one.How to reproduce the bug.
Dependencies are
Run next simple test in Wdio testrunner
Relevant log output
Code of Conduct
Is there an existing issue for this?