Selenium clicks an element 'successfully', yet, it is not actually clicked

Try this, Click using javascript and feel free to change the locate for the element according to your convenience:-

WebElement element= driver.findElement(By.xpath("YOUR XPATH"));

JavascriptExecutor executor = (JavascriptExecutor) driver;
executor.executeScript("arguments[0].click();", element);

Hope it will help you :)


Seems like the element is not enabled or not clickable initially. And to answer your question, yes there is an explicit wait you can use and wait for the element to be clickable:

WebDriverWait wait = new WebDriverWait(driver, timeOut);
wait.until(ExpectedConditions.elementToBeClickable(locator));

Try scrolling to the element before clicking on it. This mostly happens when you test on chrome. You can use JavaScriptExecutor to scroll.

Something like this:

JavascriptExecutor jse = (JavascriptExecutor)driver;
jse.executeScript("window.scrollTo(0," + element.getLocation().Y + ")");