I am facing an issue where I need to click on an element that is being intercepted by another element. My workaround involves scrolling down the vertical scrollbar in order to reach my target element. To achieve this, I am using the following code snippet:
JavascriptExecutor js = (JavascriptExecutor)driver;
js.executeScript("window.scrollBy(0, -800)", "");
Unfortunately, the above code does not seem to be effectively scrolling down the scroll bar.
I have also attempted using movetoelement, but this method has not provided a solution either. I would appreciate any assistance or alternative solutions you may have.
action.moveToElement(seatLayout.seat_A16);
Thread.sleep(2000);
seatLayout.seat_A16.click();