Can someone please help me how to get this code working?
String mvt = "1500";
JavascriptExecutor js = (JavascriptExecutor)driver;
js.executeScript("window.scrollBy(0,mvt));
As you can see I want to use the number in mvt in the execution script. For now, I get the error:
syntax error, insert ";" to complete Statement
String literal is not properly closed by a double-quote
at UsingActionsClass.UsingActions.main(UsingActions.java:23)
So, what will be the proper syntax, please?
Thank you.