Category:
Selenium WebDriver
1. Use Actions() method
WebElement element = driver.findElement(By(“element_path”));
Actions actions = new Actions(driver);
actions.moveToElement(element).click().perform();
————————————————————————-
2. Use Waits to let the page load completely before the click is performed
driver.manage().timeouts().implicitlywait(15 TimeUnit.seconds)
———————————————————————–
3. The element is not clickable because of a Spinner/Overlay on top of it:
By loadingImage = By.id(“loading image ID”);
WebDriverWait wait = new WebDriverWait(driver, timeOutInSeconds);
wait.until(ExpectedConditions.invisibilityOfElementLocated(loadingImage));