nativescript-dev-appium icon indicating copy to clipboard operation
nativescript-dev-appium copied to clipboard

findElementsByClassName failure instantly terminates the test and cannot be handled

Open interrobrian opened this issue 6 years ago • 1 comments

Describe the bug When calling findElementsByClassName, I'd like to continue if no elements are found. However, if no elements match the class name, my test instantly terminates like so:

Error: [waitForElementsByClassName("textfield",5000)] Element condition wasn't satisfied!

This happens even if my await driver.findElementsByClassName is surrounded by a try catch or has a .catch() on it. There seems to be no way to recover from or handle this error.

To Reproduce Create an app with no TextFields, then make an end-to-end test and try findElementsByClassName("textfield").

Expected behavior I believe any findElements... functions should return an empty array if no elements match the find criteria. At the very least, they should throw an Error instead of forcibly terminating the test.

interrobrian avatar Jun 06 '19 15:06 interrobrian

Any updates on this? It's a huge blocker for me.

dkoudrinhc avatar Jun 02 '21 01:06 dkoudrinhc