Powered By Blogger

Search Here!

Showing posts with label Scroll. Show all posts
Showing posts with label Scroll. Show all posts

Monday, April 29, 2013

Selenium : Scroll Automatically Before Click On Element

If you want to click() on a WebElement, but it is not showing because it is in invisible state. So, we need scroll the WebElement to make it in visible state and perform click() action.


((JavascriptExecutor) webDriver).executeScript "arguments[0].scrollIntoView(true);", webelementObject);