I'm implementing a lot of Selenium tests using Java. Sometimes, my tests fail due to a
This can happen if a DOM operation happening on the page is temporarily causing the element to be inaccessible. To allow for those cases, you can try to access the element several times in a loop before finally throwing an exception.
see this excellent solution: