Using selenium with java, I need to test a \"Back to top\" button, so what I did is to scroll page down until \"Back to top\" button is shown (as it is shown when scrolled 25% o
if necessary, find the position scrolled to one specify div, use this code:
JavascriptExecutor executor = (JavascriptExecutor) driver; Long value = (Long) executor.executeScript("return document.getElementById('container').scrollTop;");