I need to go down using the scroll bar on a web page using selenium webdriver
I used the following code
Actions dragger = new Actions(driver); WebElement draggablePartOfScrollbar = driver.findElement(By.xpath("/html/body/section[2]/div/div[2]/div/div/div")); int numberOfPixelsToDragTheScrollbarDown = 5000; dragger.moveToElement(draggablePartOfScrollbar).clickAndHold().moveByOffset(0,numberOfPixelsToDragTheScrollbarDown).release().perform();
still not moving down ... xpath changes according to the position of the scrollbar ...
c # selenium selenium-webdriver
Prasad din
source share