For scrolling through a section, I wrote below code:
JavaScriptExecutor js= (JavaScriptExecutor) driver;
js.executeScript (scroll code);
but here executeSctipt method is autosuggested like:
js.executeScript(null,args)
and it throw error as null cannot create object. The actual argument (scroll code) is working as expected in the console.
It should be displayed as:
js.executeScript(arg0,arg1);