I'll describe my situation. I'm using wait method here
wait.until(ExpectedConditions.visibilityOfElementLocated(By.linkText("Tehingud"))).click();
With a 10 seconds wait timeout
WebDriverWait wait = new WebDriverWait(login.getDriver(), 10);
Right after the element that comes before this one is clicked, I'm getting this error
"Element X is not clickable at point. Other element would receive the click:".
So I changed the visibilityOfElementLocated
method to elementToBeClickable
and then got this error
"stale element reference: element is not attached to the page document".
The help that I'm looking for is not only telling me what to use but I would really appreciate if someone could explain me why this doesn't work? My understanding is that in any case it should be waiting 10 seconds at least, shouldn't it?