Hacker News new | ask | show | jobs
by dplgk 2666 days ago
I've tried various automated browser tools and they all were flakey. (e.g. Randomly hangs while waiting for an element to appear when the element is already there.). Is this is a bug in my testing code or are all these types of tools actually that unreliable?
1 comments

I'd say it's definitely hard to write cross-browser automated tests that are not flaky.

Some of that is due to unreliably implementations of the Webdriver API (or the previous Selenium JSON Wire protocol) in the different drivers.

Another part is that the API by nature is asynchronous, which might make it harder to reason about - although with WebdriverIO you can actually write your tests in a synchronous way, or using async/await with modern NodeJS versions.

Regarding the error you described - waiting for an element to appear when the element is already there: This might also be due to the element being outside of the viewport - e.g. the browser will not be able to click on it until you scroll there.