0

I am trying to create a method of which I can call in my @Test however, it seems not to be working. I passed the driver and use String x and y to pass the argument which didn't work. Please help me here to fix it or if there's any other way to create this method. Thank you

public static void ScrollByPixel(WebDriver driver, String x, String y){
    JavascriptExecutor jse = (JavascriptExecutor) driver;
    jse.executeScript("window.scrollBy(x-pixels,y-pixels)");
}
Prophet
  • 21,440
  • 13
  • 47
  • 64
MMG
  • 1

0 Answers0