-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix waitForElement not waiting enough #7
Conversation
The code for waitForElement was depending on depreacted server behaviour (Responding with a 200 OK and an empty element when a search failed) and didn't work correctly against a conforming server failing with 404 "no such element". Fix the code and add tests around this function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@vbfox how is this deployed? do you have to manually push the new package to npm when you merge or is it done automatically ? |
I'll need to bump the version, and publish it to npm once it's merged |
When an error of type 'no such element' is detected WebDriverIO has a special handling for it and returns the error object instead of the element reference. With this fix we should handle both cases where this detection has worked and cases where it hasn't but the W3C error is still 'no such element'.
Turns out that there are multiple way a |
Some elements disappear briefly during animations, or the element that was matched at the start disappear to be replaced by another that happens to have the same text.
The resulting stability will be better and the API is supported contrary to getElementLocation.
The code for
waitForElement
was depending on deprecated server behaviour (Responding with a 200 OK and an empty element when a search failed) and didn't work correctly against a conforming server failing with 404 "no such element".Fix the code and add tests around this function.