Flakiness fix when checking for displayed element

Made a change to combat flakiness when checking for an element to be displayed
which exception are you expecting?  we should probably be specific here