I've encountered an issue with my scroll method - it works in most cases, but there's one instance where it's failing to scroll.
Here's the method in question:
public static void scrollPanelUp(WebElement element, WebDriver driver) {
debug.print(thisClass + " scrolling up...");
try {
// Creating a new instance of Javascript executor
JavascriptExecutor je = (JavascriptExecutor) driver;
// Executing a query to scroll until the element is visible on the page
je.executeScript("arguments[0].scrollIntoView(true);", element);
debug.print(thisClass + " successfully scrolled up!");
} catch (Exception e) {
System.err.println(thisClass + " encountered an error in scrollPanelUp: " + e.getMessage());
e.printStackTrace();
}
}
Any insights into why it might be failing to scroll in this particular instance?