Making Tests More Robust

I have just finished writing some tests for a section of my application. However the tests appear flaky and quite often complain that an element doesn’t exist, when it does. I have added:

wait.until(ExpectedConditions.elementToBeClickable(anotherproblem));

to my code but it doesn’t appear to be helping too much.

Does anyone have ideas on what I can do to make my tests more robust.


edition 19 to 27

@Tom_Cockram
step number one: move all clicks into ONE function
step number two: write how you finding elements?