When attempting to use scroll(x,y) in Internet Explorer 10 with JavaScript, I encountered an issue when trying to run the script on a website. Is there an alternative method that works for IE? This is part of a Java Selenium test where I need to scroll within the page using the JavaScript executor.
for(int i=0;i<X;i+=Y)
String cmd = "window.scrollTo(0,"+i+")";
((JavascriptExecutor) driver).executeScript(cmd);
I have implemented the above code in my test to scroll the page, however, it does not work in Internet Explorer IE10.