I am having an issue with Selenium WebDriver. I try to click on a link that is outside the window page (you\'d need to scroll up to see it). My current code is fairly standa
This solution worked like a charm for me:
public void click(By by) throws Exception{ WebElement element = driver.findElement(by); ((JavascriptExecutor) driver).executeScript("arguments[0].scrollIntoView(true);", element); Thread.sleep(500); element.click(); }