I am using Webdriver to drive the browser for testing our website.
However, I am running into problems where Webdriver is unable to perform operations on a page element, unless I scroll down the page using something like driver.findElement(By.id("myElementId")).sendKeys(Keys.ARROW_DOWN);
My question is, does the WebElement
always have to be displayed on the page for any operation (such as click()
) to be performed? Shouldn't it be sufficient that the element is present in the DOM after the page is loaded?